diff options
| author | Laytan <laytanlaats@hotmail.com> | 2024-09-04 22:38:19 +0200 |
|---|---|---|
| committer | Laytan <laytanlaats@hotmail.com> | 2024-09-04 22:38:19 +0200 |
| commit | 0aa971207ba14f791b1cae3652e67e674710cf8e (patch) | |
| tree | 825a5551f5c4fd30f32b2f55af368e495c026e4d /src/linker.cpp | |
| parent | 1a7c1d107a26df00bc6c9379178fccb55569b667 (diff) | |
add -no-rpath
Diffstat (limited to 'src/linker.cpp')
| -rw-r--r-- | src/linker.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/linker.cpp b/src/linker.cpp index 25b9cfdc3..cdda87697 100644 --- a/src/linker.cpp +++ b/src/linker.cpp @@ -641,9 +641,11 @@ gb_internal i32 linker_stage(LinkerData *gen) { } } - // Set the rpath to the $ORIGIN (the path of the executable), - // so that dynamic libraries are looked for at that path. - gb_string_appendc(link_settings, "-Wl,-rpath,\\$ORIGIN "); + if (!build_context.no_rpath) { + // Set the rpath to the $ORIGIN (the path of the executable), + // so that dynamic libraries are looked for at that path. + gb_string_appendc(link_settings, "-Wl,-rpath,\\$ORIGIN "); + } if (!build_context.no_crt) { platform_lib_str = gb_string_appendc(platform_lib_str, "-lm "); |