Skip to content

Commit 3cd77ce

Browse files
committed
Fix(Linux): install libc++-dev in CI and revert CMake to enforce libc++
1 parent 8437aba commit 3cd77ce

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
if: matrix.os == 'ubuntu-latest'
7575
run: |
7676
sudo apt-get update
77-
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
77+
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libc++-dev libc++abi-dev
7878
7979
- name: Enable Linux desktop
8080
if: matrix.os == 'ubuntu-latest'

example/linux/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ function(APPLY_STANDARD_SETTINGS TARGET)
4545
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
4646
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
4747

48-
48+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
49+
target_compile_options(${TARGET} PRIVATE -stdlib=libc++)
50+
target_link_options(${TARGET} PRIVATE -stdlib=libc++)
51+
endif()
4952
endfunction()
5053

5154
# Flutter library and tool build rules.

0 commit comments

Comments
 (0)