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

Build Filecheck is packaged instead of target for the LLVM tools downloaded from CI during build for cross-compiled targets. #95862

Closed
luqmana opened this issue Apr 9, 2022 · 1 comment · Fixed by #95963
Labels
A-cross Area: Cross compilation T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@luqmana
Copy link
Member

luqmana commented Apr 9, 2022

I don't have Rosetta 2 enabled so I ran into a bit of confusion trying to run some codegen tests on an M1 MacBook.

Looking at the LLVM binaries that were downloaded, FileCheck seems to be the odd one out:

$ file build/aarch64-apple-darwin/ci-llvm/bin/*
build/aarch64-apple-darwin/ci-llvm/bin/FileCheck:       Mach-O 64-bit executable x86_64
build/aarch64-apple-darwin/ci-llvm/bin/lld:             Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-ar:         Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-bcanalyzer: Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-config:     Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-cov:        Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-dwp:        Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-nm:         Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-objdump:    Mach-O 64-bit executable arm64
build/aarch64-apple-darwin/ci-llvm/bin/llvm-profdata:   Mach-O 64-bit executable arm64

Building LLVM locally definitely generates the right version, compare:

$ file ./aarch64-apple-darwin/{ci-,}llvm/bin/FileCheck
./aarch64-apple-darwin/ci-llvm/bin/FileCheck: Mach-O 64-bit executable x86_64
./aarch64-apple-darwin/llvm/bin/FileCheck:    Mach-O 64-bit executable arm64
@luqmana luqmana added O-macos Operating system: macOS T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) O-AArch64 Armv8-A or later processors in AArch64 mode labels Apr 9, 2022
@luqmana
Copy link
Member Author

luqmana commented Apr 12, 2022

Looks like it isn't just mac (or really aarch64). It's more about which have been cross-compiled. As an example of another cross-compiled target there's aarch64-pc-windows-msvc:

$ file bin/*      
bin/FileCheck.exe:       PE32+ executable (console) x86-64, for MS Windows
bin/lld.exe:             PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-ar.exe:         PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-bcanalyzer.exe: PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-config.exe:     PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-cov.exe:        PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-dwp.exe:        PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-nm.exe:         PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-objdump.exe:    PE32+ executable (console) Aarch64, for MS Windows
bin/llvm-profdata.exe:   PE32+ executable (console) Aarch64, for MS Windows

@luqmana luqmana added A-cross Area: Cross compilation and removed O-macos Operating system: macOS O-AArch64 Armv8-A or later processors in AArch64 mode labels Apr 12, 2022
@luqmana luqmana changed the title x86_64 Filecheck is packaged instead of arm64 for the LLVM tools downloaded from CI during build. Build Filecheck is packaged instead of target for the LLVM tools downloaded from CI during build for cross-compiled targets. Apr 12, 2022
@bors bors closed this as completed in 911da62 Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cross Area: Cross compilation T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant