File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,15 @@ jobs:
13
13
include :
14
14
- os : macos14
15
15
build_type : Release
16
+ static : false
16
17
- os : heavy
17
18
build_type : Release
19
+ static : true
18
20
container :
19
21
image : rippleci/clio_ci:latest
20
22
- os : heavy
21
23
build_type : Debug
24
+ static : true
22
25
container :
23
26
image : rippleci/clio_ci:latest
24
27
runs-on : [self-hosted, "${{ matrix.os }}"]
50
53
conan_profile : ${{ steps.conan.outputs.conan_profile }}
51
54
conan_cache_hit : ${{ steps.restore_cache.outputs.conan_cache_hit }}
52
55
build_type : ${{ matrix.build_type }}
56
+ static : ${{ matrix.static }}
53
57
54
58
- name : Build Clio
55
59
uses : ./.github/actions/build_clio
Original file line number Diff line number Diff line change @@ -11,18 +11,16 @@ target_sources(clio_server PRIVATE Main.cpp)
11
11
target_link_libraries (clio_server PRIVATE clio )
12
12
13
13
if (static )
14
- target_link_options (clio_server PRIVATE -static )
15
-
16
- if (is_gcc AND NOT san )
14
+ if (san )
15
+ message (FATAL_ERROR "Static linkage not allowed when using sanitizers" )
16
+ elseif (is_appleclang )
17
+ message (FATAL_ERROR "Static linkage not supported on AppleClang" )
18
+ else ()
17
19
target_link_options (
18
- # For now let's assume that we only using libstdc++ under gcc.
20
+ # Note: -static-libstdc++ can statically link both libstdc++ and libc++
19
21
clio_server PRIVATE -static-libstdc++ -static-libgcc
20
22
)
21
23
endif ()
22
-
23
- if (is_appleclang )
24
- message (FATAL_ERROR "Static linkage not supported on AppleClang" )
25
- endif ()
26
24
endif ()
27
25
28
26
set_target_properties (clio_server PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} )
You can’t perform that action at this time.
0 commit comments