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

Avoid llvm-nm / llvm-objcopy special cases for mingw #107453

Open
nikic opened this issue Jan 29, 2023 · 2 comments
Open

Avoid llvm-nm / llvm-objcopy special cases for mingw #107453

nikic opened this issue Jan 29, 2023 · 2 comments
Labels
O-windows Operating system: Windows

Comments

@nikic
Copy link
Contributor

nikic commented Jan 29, 2023

#100178 switched a few places that previously used llvm-nm / llvm-objcopy to use nm / objcopy instead, because the LLVM tools have some kind of output redirection / piping issue with the new toolchain.

We should figure out what the root cause of this is an try to fix it somewhere.

Example:

# We're using the llvm-nm instead of the system nm to ensure it is compatible
# with the LLVM bitcode generated by rustc.
# Except on Windows where piping/IO redirection under MSYS2 is wonky with llvm-nm.
ifndef IS_WINDOWS
NM = "$(LLVM_BIN_DIR)"/llvm-nm
else
NM = nm
endif

@nikic nikic added the O-windows-gnu Toolchain: GNU, Operating system: Windows label Jan 29, 2023
@mati865
Copy link
Contributor

mati865 commented Jan 29, 2023

FWIW this issue affects all Windows targets because these tools are used on both MSVC and GNU.

@rustbot modify labels: -O-windows-gnu O-windows

@rustbot rustbot added O-windows Operating system: Windows and removed O-windows-gnu Toolchain: GNU, Operating system: Windows labels Jan 29, 2023
@mati865
Copy link
Contributor

mati865 commented Feb 3, 2023

I think this patch could solve this issue but I haven't tested: https://reviews.llvm.org/D142224

Also cross-linking issue at MSYS2: msys2/MINGW-packages#9044

Update: it didn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

3 participants