mirror of
https://github.com/hyprwm/hyprlang.git
synced 2024-12-22 01:49:49 +01:00
ci/cmake: fix clang build on arch
This commit is contained in:
parent
969cb076e5
commit
554c95a846
2 changed files with 7 additions and 4 deletions
8
.github/workflows/arch.yml
vendored
8
.github/workflows/arch.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
|||
run: |
|
||||
sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
|
||||
pacman --noconfirm --noprogressbar -Syyu
|
||||
pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang
|
||||
pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang libc++
|
||||
|
||||
- name: Build hyprlang with gcc
|
||||
run: |
|
||||
|
@ -28,7 +28,7 @@ jobs:
|
|||
- name: Build tests with clang
|
||||
run: |
|
||||
rm -rf ./build
|
||||
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-stdlib=libc++" -S . -B ./build
|
||||
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --build ./build --config Release --target tests -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
|
||||
- name: Run tests
|
||||
|
@ -131,11 +131,11 @@ jobs:
|
|||
run: |
|
||||
sed -i 's/SigLevel = Required DatabaseOptional/SigLevel = Optional TrustAll/' /etc/pacman.conf
|
||||
pacman --noconfirm --noprogressbar -Syyu
|
||||
pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang
|
||||
pacman --noconfirm --noprogressbar -Sy gcc base-devel cmake clang libc++
|
||||
|
||||
- name: Build hyprlang with clang
|
||||
run: |
|
||||
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-stdlib=libc++" -S . -B ./build
|
||||
CC="/usr/bin/clang" CXX="/usr/bin/clang++" cmake --build ./build --config Release --target hyprlang -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF`
|
||||
cmake --install ./build
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
# for std::expected.
|
||||
# probably evil. Arch's clang is very outdated tho...
|
||||
target_compile_options(hyprlang PUBLIC -std=gnu++2b -D__cpp_concepts=202002L -Wno-macro-redefined)
|
||||
add_compile_options(-stdlib=libc++)
|
||||
add_link_options(-stdlib=libc++ -lc++abi)
|
||||
message(STATUS "Using clang++ to compile hyprlang")
|
||||
endif()
|
||||
|
||||
install(TARGETS hyprlang)
|
||||
|
|
Loading…
Reference in a new issue