-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHA: Integrate Alpine musl job in main workflow #4826
base: master
Are you sure you want to change the base?
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. |
@@ -58,8 +58,20 @@ void main(string[] args) | |||
auto r = Runtime.unloadLibrary(h); | |||
if (!r) | |||
assert(0); | |||
if (finalizeCounter != 4) | |||
assert(0); | |||
version (darwin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, replace darwin
with OSX
because it is more common throughout the source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 (OSX) | |
version = Darwin; | |
else version (iOS) | |
version = Darwin; | |
else version (TVOS) | |
version = Darwin; | |
else version (WatchOS) | |
version = Darwin; |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.