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

is_flag_supported returns false negative #892

Closed
tcharding opened this issue Nov 2, 2023 · 3 comments
Closed

is_flag_supported returns false negative #892

tcharding opened this issue Nov 2, 2023 · 3 comments

Comments

@tcharding
Copy link

When building with the wasm32-unknown-unknown target flags are not getting passed correctly to clang.

cc::Builder::new().flag_if_supported("-Wno-unused-function") ignores the flag but flag("-Wno-unused-function") works.

It looks like is_flag_supported is giving a false negative. I managed to get this error

warning: output: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "clang: error: unable to execute command: Executable \"wasm-ld-14\" doesn't exist!\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\n" }

My machine does not have wasm-ld-14 installed, it has wasm-ld-15. I was not able to work out why the wrong version is used in is_flag_supported but the correct version is used when running try_compile.

@dot-asm
Copy link
Contributor

dot-asm commented Nov 3, 2023

Community solution was suggested in #839.

@thomcc
Copy link
Member

thomcc commented Nov 3, 2023

That one had slipped under my radar (Had been pretty busy with $DAYJOB around the time it was submitted). I've merged it, and it should be in the next release.

@tcharding
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants