Skip to content

Commit d096790

Browse files
committed
Add a comment explaining the rpath option for musl swcfi
1 parent 8b204c5 commit d096790

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sdk/mx.sdk/mx_sdk_vm_ng.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,10 @@ def ldflags(self):
734734
if not mx.is_windows():
735735
_dynamic_ldflags += ['-pthread']
736736
if self.uses_musl_swcfi_toolchain:
737+
# Use $$ to escape the $ from expansion by mx. If we use musl swcfi
738+
# and their libc, the libc++, libc++abi and libunwind must be
739+
# either in the LD_LIBRARY_PATH (which takes precedence) or in the
740+
# lib folder of the standalone.
737741
_dynamic_ldflags.append(r"-Wl,-rpath,'$$ORIGIN/../lib'")
738742
return super().ldflags + _dynamic_ldflags
739743

0 commit comments

Comments
 (0)