Skip to content

build: Install llvm-ranlib in OSS toolchains #72212

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

Merged

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Mar 9, 2024

This change adds llvm-ranlib to the list of components installed into the OSS toolchains for macOS and Linux. The llvm-ranlib tool is required for WebAssembly builds because system ranlib usually cannot recognize Wasm object format. llvm-ranlib is just a symlink to llvm-ar, so extra space is hopefully not a concern.

Without installing the tool, each Swift SDK for WebAssembly needs to build and distribute llvm-ranlib as a part of the SDK even though the toolchain has the actual code of llvm-ranlib as llvm-ar.

This change adds `llvm-ranlib` to the list of components installed into
the OSS toolchains for macOS and Linux. The `llvm-ranlib` tool is
required for WebAssembly builds because system `ranlib` usually cannot
recognize Wasm object format. `llvm-ranlib` is just a symlink to
`llvm-ar`, so extra space is not a concern.
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@kateinoigakukun
Copy link
Member Author

@swift-ci build toolchain

@kateinoigakukun kateinoigakukun merged commit 761812a into swiftlang:main Mar 11, 2024
@kateinoigakukun kateinoigakukun deleted the yt/install-llvm-ranlib branch March 14, 2024 09:58
kateinoigakukun added a commit to kateinoigakukun/swift that referenced this pull request Mar 30, 2024
llvm-ranlib is now installed in the toolchain, so we can use it instead of
the one in the build directory.

swiftlang#72212
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.

2 participants