-
Notifications
You must be signed in to change notification settings - Fork 955
tinygo: set cmd.Dir even when running emulators #2387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This allows compress/bzip2 to pass with -target=wasi Fixes tinygo-org#2367
LGTM. Rescues GOOS=windows tinygo test debug/macho , too! |
Huh. . . I actually seem to still get an access error:
|
This also seems to prevent wasm (js wasm) from even starting at all, since it seems to use a relative path:
|
Hmm.. can we use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems to prevent wasm (js wasm) from even starting at all, since it seems to use a relative path:
Error: Cannot find module '/usr/lib/go/src/compress/bzip2/targets/wasm_exec.js'
You are correct, this is a regression.
The easiest solution may be to use the same {root}
pattern as is used in CFlags. See for example:
Lines 4 to 8 in 06df319
"cflags": [ | |
"-DNRF51", | |
"-I{root}/lib/CMSIS/CMSIS/Include", | |
"-I{root}/lib/nrfx/mdk" | |
], |
Looks like
Where would be the best place to handle that substitution? |
It looks like we handle it for |
I was starting to look at |
|
8493853
to
39ef4d8
Compare
This is ready for review now. |
Actually, I was thinking we should do it the other way round. I don't think I wrote this down anywhere, but the way I see it is that
Anyway, that is the design as I have it in my mind. |
So, should the logic in this PR be moved to |
That would be most consistent with the rest of the code. |
This allows compress/bzip2 to pass with -target=wasi
Fixes #2367