@@ -54,7 +54,6 @@ public static class DefaultArguments {
54
54
public final List <String > unixWarningArgs = List .of ("-Wall" , "-Wextra" );
55
55
public final List <String > unixWarningsAsErrorsArgs = List .of ("-Werror" );
56
56
57
- public final String unixRpathOriginArg = "-Wl,-rpath,'$ORIGIN'" ;
58
57
public final String unixSymbolArg = "-g" ;
59
58
60
59
// -Wdeprecated-enum-enum-conversion was introduced in GCC 11
@@ -64,15 +63,15 @@ public static class DefaultArguments {
64
63
public final List <String > linuxCrossCompilerExtraArgs10 = List .of ("-Wno-error=deprecated-declarations" );
65
64
public final List <String > linuxCrossCCompilerArgs = List .of ("-Wformat=2" , "-pedantic" , "-Wno-psabi" ,
66
65
"-Wno-unused-parameter" , "-fPIC" , "-pthread" );
67
- public final List <String > linuxCrossLinkerArgs = List .of ("-rdynamic" , "-pthread" , "-ldl" , "-latomic" );
66
+ public final List <String > linuxCrossLinkerArgs = List .of ("-rdynamic" , "-pthread" , "-ldl" , "-latomic" , "-Wl,-rpath,'$ORIGIN'" );
68
67
public final List <String > linuxCrossReleaseCompilerArgs = List .of ("-O2" );
69
68
public final List <String > linuxCrossDebugCompilerArgs = List .of ("-Og" );
70
69
71
70
public final List <String > linuxCompilerArgs = List .of ("-std=c++20" , "-Wformat=2" , "-pedantic" , "-Wno-psabi" ,
72
71
"-Wno-unused-parameter" , "-Wno-error=deprecated-enum-enum-conversion" , "-fPIC" , "-pthread" );
73
72
public final List <String > linuxCCompilerArgs = List .of ("-Wformat=2" , "-pedantic" , "-Wno-psabi" ,
74
73
"-Wno-unused-parameter" , "-fPIC" , "-pthread" );
75
- public final List <String > linuxLinkerArgs = List .of ("-rdynamic" , "-pthread" , "-ldl" , "-latomic" );
74
+ public final List <String > linuxLinkerArgs = List .of ("-rdynamic" , "-pthread" , "-ldl" , "-latomic" , "-Wl,-rpath,'$ORIGIN'" );
76
75
public final List <String > linuxReleaseCompilerArgs = List .of ("-O2" );
77
76
public final List <String > linuxDebugCompilerArgs = List .of ("-O0" );
78
77
@@ -91,7 +90,7 @@ public static class DefaultArguments {
91
90
public final List <String > macDebugCompilerArgs = List .of ("-O0" );
92
91
public final List <String > macLinkerArgs = List .of ("-framework" , "CoreFoundation" , "-framework" , "AVFoundation" ,
93
92
"-framework" , "Foundation" , "-framework" , "CoreMedia" , "-framework" , "CoreVideo" ,
94
- "-headerpad_max_install_names" );
93
+ "-headerpad_max_install_names" , "-Wl,-rpath,'@loader_path'" );
95
94
}
96
95
97
96
public static class Platforms {
@@ -379,26 +378,6 @@ public void addWarningsAsErrors(String... platforms) {
379
378
}
380
379
}
381
380
382
- private void addPlatformRpathAsOrigin (String platform ) {
383
- PlatformConfig plat = unixPlatforms .get (platform );
384
- if (plat != null ) {
385
- plat .getLinker ().getArgs ().add (defaultArguments .unixRpathOriginArg );
386
- return ;
387
- }
388
- }
389
-
390
- public void addPlatformRpathAsOrigin (String ... platforms ) {
391
- if (platforms .length == 0 ) {
392
- for (String platform : this .platforms .allPlatforms ) {
393
- addPlatformRpathAsOrigin (platform );
394
- }
395
- } else {
396
- for (String platform : platforms ) {
397
- addPlatformRpathAsOrigin (platform );
398
- }
399
- }
400
- }
401
-
402
381
private DependencyVersions dependencyVersions ;
403
382
404
383
private void registerStandardDependency (ExtensiblePolymorphicDomainObjectContainer <NativeDependency > configs ,
0 commit comments