-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
40 lines (34 loc) · 1.1 KB
/
build.gradle
File metadata and controls
40 lines (34 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
plugins {
id 'java-library'
id 'org.graalvm.buildtools.native' version '0.11.0'
}
repositories {
mavenCentral()
}
def osName = System.getProperty("os.name").toLowerCase()
def osArch = System.getProperty("os.arch").toLowerCase().replace("amd64", "x64").replace("amd64", "x64").replace("x86_64", "x64")
graalvmNative {
binaries.main {
imageName = 'libghidra'
debug = project.hasProperty('buildDebug') ? project.property('buildDebug').toBoolean() : true
fallback = false
sharedLibrary = true
quickBuild = true
useArgFile = false
buildDir = "build/" + osArch
if (osName.contains("windows")) {
// Checking toolchain is super fragile on windows
buildArgs.add('-H:+UnlockExperimentalVMOptions')
buildArgs.add('-H:-CheckToolchain')
} else if (osName.contains("mac")) {
// Checking toolchain fails when running under rosetta
buildArgs.add('-H:+UnlockExperimentalVMOptions')
buildArgs.add('-H:-CheckToolchain')
} else if (osName.contains("linux")) {
}
buildArgs.add('-Ob')
//buildArgs.add("--emit build-report")
}
}
dependencies {
}