Skip to content

Commit

Permalink
Try passing -stdlib=libc++
Browse files Browse the repository at this point in the history
Seeing if this builds everywhere and fixes the Clang compilation issue on Ubuntu latest (where Clang doesn’t like stdlibc++ chrono headers).
  • Loading branch information
NickGerleman authored Oct 27, 2023
1 parent 4f98bfe commit 3a3200b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/project-defaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ add_compile_options(
$<$<CONFIG:RELEASE>:-O2>
# Enable separate sections per function/data item
$<$<CONFIG:RELEASE>:-ffunction-sections>
$<$<CONFIG:RELEASE>:-fdata-sections>)
$<$<CONFIG:RELEASE>:-fdata-sections>
# Use libc++ when building with Clang on Linux
$<$<CXX_COMPILER_ID:Clang,GNU>:-stdlib=libc++>)

add_link_options(
# Discard unused sections
Expand Down

0 comments on commit 3a3200b

Please sign in to comment.