GHA: Integrate Alpine musl job in main workflow#4826
GHA: Integrate Alpine musl job in main workflow#4826kinke merged 9 commits intoldc-developers:masterfrom
Conversation
fb64457 to
969402a
Compare
3f95f9b to
83cab98
Compare
Incl. prebuilt package etc.
83539fc to
c3f00ed
Compare
c9122cd to
62905ee
Compare
…t.curl] Incl. the Phobos test runner, and dub.
|
cool that you are working on this! |
0e98a19 to
2df74c9
Compare
|
Okay, should be ready now, after lots of trial & error runs, as usual for these CI MRs. I guess adding a musl AArch64 job as follow-up would be pretty trivial. Some notes:
|
|
Very cool! Let's fix the static linking later. |
| assert(0); | ||
| if (finalizeCounter != 4) | ||
| assert(0); | ||
| version (darwin) |
There was a problem hiding this comment.
nitpick, replace darwin with OSX because it is more common throughout the source code.
There was a problem hiding this comment.
Yeah I know it's deprecated (unfortunately), but it's more convenient than the usual
ldc/runtime/druntime/src/core/demangle.d
Lines 15 to 22 in 9de21fd
version (darwin) usages for this shared druntime integration test, so I added the 4th one, out of laziness of course. ;)
| -DCOMPILER_RT_LIBDIR_OS=linux | ||
| -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=x86_64 | ||
| -DTEST_COMPILER_RT_LIBRARIES="profile;lsan;asan;msan;fuzzer" | ||
| -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ |
There was a problem hiding this comment.
perhaps it is as simple as -DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++;-static" to get fully statically linked ldc_profgen (cpp-only executables) ? I'm OK to leave as is for now.
There was a problem hiding this comment.
Yes that would include the 2 pure C++ LLVM tools, but unfortunately also the static Phobos test runner, where the std.net.curl unittests then fail...
There was a problem hiding this comment.
And D_LINKER_ARGS apply to all D executables built via build_d_executable() (now for LDC_LINK_MANUALLY=OFF too, where it was previously ignored). And that unfortunately also includes the ldc-build-runtime tool. Edit: But no druntime/Phobos test runners, they are pure C executables (in CMake terms).
So I think we need a dedicated CMake option for fully-static linking (on Posix), adding -static for suited executables only (no ldc-build-runtime, but the PGO LLVM tools).
There was a problem hiding this comment.
Okay I've pushed a commit to that effect, and now all but dub/reggae/ldc-build-runtime executables are fully static.
|
Btw, I was surprised that I could link & run a Phobos-hello-world on my Ubuntu 24 box - with the bundled compiler, druntime and Phobos targeting a musl triple (edit: and my system |
Incl. prebuilt package etc.