-
Notifications
You must be signed in to change notification settings - Fork 126
mozjs_sys: Honor the CXXSTDLIB
environment variable
#615
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
} else if target.contains("windows") && target.contains("gnu") { | ||
println!("cargo:rustc-link-lib=stdc++"); | ||
} else { | ||
println!("cargo:rustc-link-lib=stdc++") | ||
} |
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 is not equivalent to previous code in case we are on windows without gnu.
} else if target.contains("windows") && target.contains("gnu") { | |
println!("cargo:rustc-link-lib=stdc++"); | |
} else { | |
println!("cargo:rustc-link-lib=stdc++") | |
} | |
} else if target.contains("windows") && target.contains("gnu") { | |
println!("cargo:rustc-link-lib=stdc++"); | |
} else if !target.contains("windows") { | |
println!("cargo:rustc-link-lib=stdc++") | |
} |
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.
Sorry, done
Also this change requires mozjs_sys version bump: |
In the same commit, or a separate one? |
It doesn't matter because all PRs are squashed on landing. |
`CXXSTDLIB` is an environment variable used by `cc` and many other crates which lets developers to choose a standard C++ library of their choice. Make use of that variable in mozjs_sys's build.rs as well. One of the use cases is supporting Linux distributions which use LLVM instead of GCC as the main toolchain (e.g. Chimera, Gentoo musl-llvm profile, OpenMandriva). Signed-off-by: Michal Rostecki <vadorovsky@disroot.org>
OK, done |
CXXSTDLIB
is an environment variable used bycc
and many other crates which lets developers to choose a standard C++ library of their choice.Make use of that variable in mozjs_sys's build.rs as well.
One of the use cases is supporting Linux distributions which use LLVM instead of GCC as the main toolchain (e.g. Chimera, Gentoo musl-llvm profile, OpenMandriva).