File tree 3 files changed +8
-9
lines changed
3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 24
24
fi
25
25
echo "DMD=$DMD" >> $GITHUB_ENV
26
26
27
- - name : ' Alpine: Set DFLAGS environment variable (-Xcc=-static)' # for fully statically linked dub etc.
28
- if : inputs.os == 'alpine'
29
- shell : bash
30
- run : |
31
- set -eux
32
- echo "DFLAGS=-Xcc=-static${DFLAGS:+ $DFLAGS}" >> $GITHUB_ENV
33
-
34
27
- name : Build & copy dub
35
28
shell : bash
36
29
run : |
56
49
cd dlang-tools
57
50
git checkout "$(cat ../ldc/packaging/dlang-tools_version)"
58
51
52
+ # Alpine: build these tools as fully static executables
53
+ if [[ '${{ inputs.os }}' == 'alpine' ]]; then
54
+ export DFLAGS="-Xcc=-static${DFLAGS:+ $DFLAGS}"
55
+ fi
56
+
59
57
mkdir bin
60
58
$DMD -w -de -dip1000 rdmd.d -of=bin/rdmd
61
59
$DMD -w -de -dip1000 ddemangle.d -of=bin/ddemangle
Original file line number Diff line number Diff line change 69
69
-DCOMPILER_RT_LIBDIR_OS=linux
70
70
-DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=x86_64
71
71
-DTEST_COMPILER_RT_LIBRARIES="profile;lsan;asan;msan;fuzzer"
72
- -DCMAKE_EXE_LINKER_FLAGS=-static
72
+ -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++
73
+ -DD_LINKER_ARGS=-static
73
74
-DD_COMPILER_FLAGS="-O -flto=full"
74
75
# FIXME: -defaultlib=phobos2-ldc-lto,druntime-ldc-lto
75
76
with_pgo : false
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ function(build_d_executable target_name output_exe d_src_files compiler_args lin
95
95
list (APPEND dep_libs "-L$<TARGET_LINKER_FILE:${l} >" )
96
96
endforeach ()
97
97
98
- set (full_linker_args ${CMAKE_EXE_LINKER_FLAGS} ${linker_args} )
98
+ set (full_linker_args ${CMAKE_EXE_LINKER_FLAGS} ${linker_args} ${D_LINKER_ARGS} )
99
99
translate_linker_args(full_linker_args translated_linker_args)
100
100
101
101
# We need to link against the C++ runtime library.
You can’t perform that action at this time.
0 commit comments