RPath settings apply only to Linux; some only to Linux on x86_64

I don't know whether Windows or MacOS needs anything similar.  If they
do, the details will differ, and should be handled by adding suitable
cases to these switch statements.
This commit is contained in:
Ben Liblit 2018-01-16 16:40:59 -06:00
parent 564a4eb9bd
commit 01acd0e338
2 changed files with 19 additions and 10 deletions

View File

@ -61,10 +61,13 @@ model {
buildable = false
}
all {
// TODO: compute path on following line from 'cast' library properties somehow
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"
switch ("$targetPlatform.operatingSystem.name/$targetPlatform.architecture.name") {
case 'linux/x86-64':
// TODO: compute path on following line from 'cast' library properties somehow
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"
}
}
}
}
@ -79,10 +82,13 @@ model {
}
}
binaries.all {
// TODO: compute path on following line from 'cast' library properties somehow
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"
switch ("$targetPlatform.operatingSystem.name/$targetPlatform.architecture.name") {
case 'linux/x86-64':
// TODO: compute path on following line from 'cast' library properties somehow
linker.args '-Wl,-rpath', "${project(':com.ibm.wala.cast').buildDir}/libs/cast/shared"
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "${currentJvm.javaHome}/jre/lib/amd64/server"
}
}
}
}

View File

@ -70,8 +70,11 @@ model {
lib library: 'jdk'
}
binaries.all {
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "$currentJavaHome/jre/lib/amd64/server"
switch ("$targetPlatform.operatingSystem.name/$targetPlatform.architecture.name") {
case 'linux/x86-64':
// TODO: compute path on following line from 'jdk' library properties somehow
linker.args '-Wl,-rpath', "$currentJavaHome/jre/lib/amd64/server"
}
}
}
}