Skip to content

Commit 67c3e6e

Browse files
committed
glibc variable
1 parent b36f20b commit 67c3e6e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/cmake.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
../configure --prefix "$glibc_install" --disable-werror --enable-cet
8686
make -j `nproc`
8787
make install -j `nproc`
88+
export LD_LIBRARY_PATH=$glibc_install/lib:$LD_LIBRARY_PATH
8889
8990
- name: Set Clang 16 as Default
9091
if: matrix.os == 'ubuntu-24.04' && matrix.c_compiler == 'clang'
@@ -93,7 +94,6 @@ jobs:
9394
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
9495
sudo update-alternatives --set clang /usr/bin/clang-16
9596
sudo update-alternatives --set clang++ /usr/bin/clang++-16
96-
export LD_LIBRARY_PATH=$glibc_install/lib:$LD_LIBRARY_PATH
9797
9898
- name: Check Clang Settings
9999
if: matrix.os == 'ubuntu-latest' && matrix.c_compiler == 'clang'
@@ -113,6 +113,7 @@ jobs:
113113
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
114114
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
115115
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
116+
-DGLIBC_PATH="$(pwd)/glibc/build/install"
116117
-S ${{ github.workspace }}
117118
118119
- name: Build

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ elseif(LINUX)
199199

200200
if (CMAKE_CXX_COMPILER MATCHES "clang")
201201
message(STATUS "Detected Clang compiler: ${CMAKE_CXX_COMPILER}")
202-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -nostdinc++ -I$ENV{glibc_install}/include/c++/v1 -L$ENV{glibc_install}/lib")
202+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -nostdinc++ -I${GLIBC_PATH}/include/c++/v1 -L${GLIBC_PATH}/lib")
203203
endif()
204204

205205
endif()

0 commit comments

Comments
 (0)