Skip to content

Commit

Permalink
chore: bump llvm on armv7
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed May 21, 2024
1 parent ea82d14 commit fd2d41f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
fail-fast: false
matrix:
settings:
- host: macos-14
- host: macos-latest
target: 'x86_64-apple-darwin'
setup: brew install nasm llvm
build: |
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
export LIB_AOM_INCLUDE_PATH=/usr/include/aom/aom &&
export LIB_AOM_PKG_CONFIG_PATH=/usr/lib/pkgconfig &&
yarn build --target x86_64-unknown-linux-musl
- host: macos-14
- host: macos-latest
downloadTarget: 'aarch64-apple-darwin'
target: 'aarch64-apple-darwin'
setup: |
Expand Down Expand Up @@ -130,13 +130,13 @@ jobs:
downloadTarget: 'armv7-unknown-linux-gnueabihf'
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf -y
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libatomic1-armhf-cross -y
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx build --load --platform linux/arm/v7 -t ubuntu:jammy-armv7 . -f jammy-armv7.Dockerfile
docker run --rm -dt --name ubuntu-jammy-armv7 ubuntu:jammy-armv7
sudo mkdir -p /usr/arm-linux-gnueabihf/lib/llvm-14
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-14/lib /usr/arm-linux-gnueabihf/lib/llvm-14/lib
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-14/include /usr/arm-linux-gnueabihf/lib/llvm-14/include
sudo mkdir -p /usr/arm-linux-gnueabihf/lib/llvm-18
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-18/lib /usr/arm-linux-gnueabihf/lib/llvm-18/lib
sudo docker cp ubuntu-jammy-armv7:/usr/lib/llvm-18/include /usr/arm-linux-gnueabihf/lib/llvm-18/include
docker stop ubuntu-jammy-armv7
build: yarn build --target armv7-unknown-linux-gnueabihf --zig --zig-link-only --zig-abi-suffix=2.18
- host: ubuntu-latest
Expand Down
10 changes: 9 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,16 @@ fn main() {
.include(format!(
"/usr/arm-linux-gnueabihf/include/c++/${gcc_version_trim}/arm-linux-gnueabihf"
));
const CROSS_LIB_PATH: &str = "/usr/lib/gcc-cross/arm-linux-gnueabihf";
if let Ok(version) = std::process::Command::new("ls")
.arg(CROSS_LIB_PATH)
.output()
.map(|o| String::from_utf8(o.stdout).unwrap().trim().to_string())
{
println!("cargo:rustc-link-search={CROSS_LIB_PATH}/{version}");
};
println!("cargo:rustc-link-search=/usr/arm-linux-gnueabihf/lib");
println!("cargo:rustc-link-search=/usr/arm-linux-gnueabihf/lib/llvm-14/lib");
println!("cargo:rustc-link-search=/usr/arm-linux-gnueabihf/lib/llvm-18/lib");
}
_ => {}
}
Expand Down
4 changes: 2 additions & 2 deletions jammy-armv7.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM ubuntu:24.04

RUN apt-get update && apt-get install -y \
libc++-14-dev \
libc++abi-14-dev
libc++-18-dev \
libc++abi-18-dev

0 comments on commit fd2d41f

Please sign in to comment.