Skip to content

Commit

Permalink
fix out_dir error for BuildDecompilerRust
Browse files Browse the repository at this point in the history
  • Loading branch information
ioo0s committed Sep 13, 2021
1 parent 4133df6 commit 56a8874
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Ghidra/Features/Decompiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,14 @@ task win64BuildDecompilerRust(type: Exec) {
def target = "${arch}-pc-windows-msvc"


commandLine 'cargo', 'build', '--release', '--target', target, '-Z', 'unstable-options', '--out-dir', '../../build/os/win64'
commandLine 'cargo', 'build', '--release', '--target', target, '-Z', 'unstable-options', '--out-dir', '../../build/os/win_x86_64'

}

task linux64BuildDecompilerRust(type: Exec) {
workingDir "./src/decompile"

def out_path = null
def arch = null

try {
Expand All @@ -402,15 +403,22 @@ task linux64BuildDecompilerRust(type: Exec) {
throw new TaskExecutionException(it, e)
}

if (arch == "aarch64") {
out_path = "../../build/os/linux_arm_64"
} else {
out_path = "../../build/os/linux_x86_64"
}


def target = "${arch}-unknown-linux-gnu"

commandLine 'cargo', 'build', '--release', '--target', target, '-Z', 'unstable-options', '--out-dir', '../../build/os/linux64'
commandLine 'cargo', 'build', '--release', '--target', target, '-Z', 'unstable-options', '--out-dir', out_path

}

task osx64BuildDecompilerRust(type: Exec) {
workingDir "./src/decompile"

def out_path = null
def arch = null

try {
Expand All @@ -419,9 +427,15 @@ task osx64BuildDecompilerRust(type: Exec) {
throw new TaskExecutionException(it, e)
}

if ( arch == "aarch64" ) {
out_path = "../../build/os/mac_arm_64"
}else {
out_path = "../../build/os/mac_x86_64"
}

def target = "${arch}-apple-darwin"

commandLine 'cargo', 'build', '--release', '--target', target, '-Z', 'unstable-options', '--out-dir', '../../build/os/osx64'
commandLine 'cargo', 'build', '--release', '--target', target, '-Z', 'unstable-options', '--out-dir', out_path

}

Expand Down

0 comments on commit 56a8874

Please sign in to comment.