-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Fix compiler detection. #82352
Fix compiler detection. #82352
Conversation
Ah, fair point! I absolutely didn't expect it to handle the arguments that way (maybe I misunderstood Scons' idea of launching it with a shell?). However, this seems to be a Scons bug(?). I plugged this change into my local copy and it broke execution on Windows again, since Scons now tries to execute an executable with the name Maybe as a question to @akien-mga: Should there probably be a CI test to ensure version checks like this actually work and return valid numbers on the CI? I'm not sure how long this has been broken for me, it just always went unter tons of other warnings while not causing a fatal issue (like with indexing |
Assuming the old code worked fine on other platforms, how about changing the line into this? version = subprocess.check_output([env.subst(env["CXX"]), "--version"], shell=(env['PLATFORM'] == "win32")).strip().decode("utf-8") |
For now I would prefer just removing |
d7df6c5
to
89b568c
Compare
Or it's something wrong with a specific version of python. It should work the same on Windows as well.
I guess it's probably safer. Changed. |
Thanks! |
@bruvzg Do you mind clarifying for me what shell=True does in this case? It's unclear on my side why the binary header for the linking object files is "incorrect". If there is something I can do manually on my side to get the source to build as a workaround for now that would be great. |
In this particular case, I think my original issue might be related to having a Python version installed that differs to the one used by Emscripten. Still have to dig a bit deeper there, but using the shell in my case forces Emscripten's batch file to be executed instead of the Python script directly (I think), which might circumvent the version difference. |
In case of macOS, Xcode 15 introduced a new linker |
@bruvzg Thank you for your reply. Since this does not fix the linking error in my case (yes I have Xcode 15 installed), do you know where I can modify the build script to get it to link properly for now? |
Cherry-picked for 4.1.3. |
Fixes compiler detection broken by #82325
With
shell=true
, if two arguments are used, the second (--version
) is not passed to clang (like:zsh -c clang --version
), if only one is used it is passed (like:zsh -c "clang --version"
).Bugsquad edit: