@@ -50,10 +50,35 @@ runs:
5050 - name : Install dependencies
5151 shell : bash
5252 run : |
53- sudo apt-get update -y && sudo apt-get install -y \
54- clang llvm libudev-dev protobuf-compiler gcc g++ build-essential libssl-dev pkg-config curl wget git libgmp3-dev netcat-openbsd
53+ # Install LLVM 19 using Makefile target
54+ make install-llvm19 SUDO=sudo CODENAME=jammy
55+
56+ # Set LLVM environment variables for Cairo Native
57+ echo "MLIR_SYS_190_PREFIX=/usr/lib/llvm-19" >> $GITHUB_ENV
58+ echo "LLVM_SYS_191_PREFIX=/usr/lib/llvm-19" >> $GITHUB_ENV
59+ echo "TABLEGEN_190_PREFIX=/usr/lib/llvm-19" >> $GITHUB_ENV
60+
61+ # Configure linker search paths for Cairo Native runtime compilation
62+ echo "LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib:/lib/x86_64-linux-gnu:/lib" >> $GITHUB_ENV
63+ echo "LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib:/lib/x86_64-linux-gnu:/lib" >> $GITHUB_ENV
64+
65+ # Set up clang-19 as default clang for Cairo Native
66+ sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-19/bin/clang-19 100
67+ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-19/bin/clang++ 100
68+
69+ # Also set explicit compiler environment variables for Cairo Native runtime
70+ # Note: clang-19 handles both C and C++ compilation
71+ echo "CC=clang-19" >> $GITHUB_ENV
72+ echo "CXX=clang-19" >> $GITHUB_ENV
73+
74+ # Configure linker for clang - use lld-19 for Cairo Native runtime compilation
75+ # These flags are passed to clang when it invokes the linker
76+ echo "LDFLAGS=-fuse-ld=lld-19" >> $GITHUB_ENV
77+
78+ # Add LLVM 19 binaries to PATH
79+ echo "/usr/lib/llvm-19/bin" >> $GITHUB_PATH
5580
5681 - name : Setup mold
5782 uses : rui314/setup-mold@v1
5883 with :
59- make-default : true
84+ make-default : false # Don't make mold the default - Cairo Native runtime compilation needs lld-19
0 commit comments