Skip to content
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

Compiler options with string arguments not parsing correctly on Windows #143

Open
thoughton opened this issue Feb 21, 2025 · 5 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@thoughton
Copy link

Hi, firstly: amazing plugin, thank you so much for making it!

It seems Odin compiler options that take an additional string argument (e.g. -extra-linker-flags) are not getting passed to the odin build command correctly on Windows.

For example, in my simple test case I have this configuration setup:

Image

but in the build output I get this:

Image

However if I test building from the command line it works fine:

Image

Thanks!

(Plugin ver. 0.13.0 in Clion 2024.3.3.)

@obiwan87
Copy link
Owner

oh yes, it's a bug for sure. Thank you for reporting.

As a workaround: Can you please remove the quotes around /nologo?

@obiwan87 obiwan87 added the bug Something isn't working label Feb 21, 2025
@obiwan87 obiwan87 added this to the 0.14.0 milestone Feb 21, 2025
@thoughton
Copy link
Author

Thanks for logging as a bug. :)

Just as a note, the workaround works for the simplified example I listed above, but it can't be used in my real use-case as I actually need to specify multiple extra linker flags, which Odin requires to be listed as a single string.

@obiwan87
Copy link
Owner

@thoughton Can you please send an example of your real use-case so I can test with it?

@thoughton
Copy link
Author

Hi @obiwan87 My real use-case is a fair bit more complex (and probably requires additional dependencies) as it's targeting WebAssembly for the WASM-4 fantasy console, but for reference it looks like:

odin build src -out:build/cart.wasm -target:freestanding_wasm32 -no-entry-point -extra-linker-flags:"--import-memory -zstack-size=14752 --initial-memory=65536 --max-memory=65536 --stack-first --lto-O3 --gc-sections --strip-all"

(More info on the setup can be found here: https://wasm4.org/docs/getting-started/setup/?code-lang=odin#no-scroll)

As before, the above compiles fine from the command line, but when I try to mimic the setup in odin-intellij I get the same errors about the quotes.

@obiwan87
Copy link
Owner

Just need to check if the command line string is generated correctly. Don't actually need to get it to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants