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

Fix is_link_cmd command to support response file #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryanking13
Copy link
Member

Fix pyodide/pyodide#5131

This fixes the is_link_cmd function which is used to detect the linker invocation.

If the command is too long, build systems like Ninja (or CMake, etc) use a response file to store the commands into a file. For instance, the command

emcc.py -o output.so input1.o input2.o ... inputN.o

becomes

emcc.py @output.so.rsp

where the file output.so.rsp stores all the commandline parameters.

Therefore, this PR fixes the is_link_cmd to detect the response file.

Note that I also removed the usage of re module, as I found that using string commands are much cheaper than compiling the regex.

  • changelog

@ryanking13 ryanking13 marked this pull request as ready for review December 9, 2024 14:22
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

Successfully merging this pull request may close these issues.

Regression in scipy build
1 participant