Skip to content

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
@ryanking13
Copy link
Member Author

This has some issue with meson response file (pyodide/pyodide#5253 (comment)). Chaning to draft until I found a better way to integrate meson responsfile with pyodide-build.

@ryanking13 ryanking13 marked this pull request as draft December 18, 2024 05:28
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