mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-27 19:45:37 +08:00
GP-4235: Adding the means to build and find native components on FreeBSD
This commit is contained in:
@@ -81,6 +81,7 @@ model {
|
||||
targetPlatform "linux_arm_64"
|
||||
targetPlatform "mac_x86_64"
|
||||
targetPlatform "mac_arm_64"
|
||||
targetPlatform "freebsd_x86_64"
|
||||
sources {
|
||||
c {
|
||||
source {
|
||||
@@ -102,6 +103,7 @@ model {
|
||||
targetPlatform "linux_arm_64"
|
||||
targetPlatform "mac_x86_64"
|
||||
targetPlatform "mac_arm_64"
|
||||
targetPlatform "freebsd_x86_64"
|
||||
sources {
|
||||
c {
|
||||
source {
|
||||
|
||||
@@ -52,6 +52,11 @@ model {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isCurrentFreeBSD()) {
|
||||
gcc(Gcc) {
|
||||
target("freebsd_x86_64")
|
||||
}
|
||||
}
|
||||
if (isCurrentWindows() && VISUAL_STUDIO_INSTALL_DIR) {
|
||||
// specify installDir because Gradle doesn't find VS Build Tools.
|
||||
// See https://github.com/gradle/gradle-native/issues/617#issuecomment-575735288
|
||||
|
||||
@@ -24,7 +24,8 @@ project.ext.PLATFORMS = [
|
||||
[name: "linux_x86_64", os: "linux", arch: "x86_64"],
|
||||
[name: "linux_arm_64", os: "linux", arch: "arm64"],
|
||||
[name: "mac_x86_64", os: "osx", arch: "x86_64"],
|
||||
[name: "mac_arm_64", os: "osx", arch: "arm64"]
|
||||
[name: "mac_arm_64", os: "osx", arch: "arm64"],
|
||||
[name: "freebsd_x86_64", os: "freebsd", arch: "x86_64"]
|
||||
]
|
||||
|
||||
/*********************************************************************************
|
||||
@@ -51,6 +52,9 @@ ext.getCurrentPlatformName = {
|
||||
case ~/Mac OS X.*/:
|
||||
os = "mac"
|
||||
break
|
||||
case ~/FreeBSD.*/:
|
||||
os = "freebsd"
|
||||
break
|
||||
default:
|
||||
throw new GradleException("Unrecognized platform operating system: $os")
|
||||
}
|
||||
@@ -112,6 +116,20 @@ ext.isCurrentMac = {
|
||||
return isMac(getCurrentPlatformName())
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Returns true if the given platform is FreeBSD.
|
||||
*********************************************************************************/
|
||||
ext.isFreeBSD = { platform_name ->
|
||||
return platform_name.startsWith("freebsd")
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Returns true if the current platform is FreeBSD.
|
||||
*********************************************************************************/
|
||||
ext.isCurrentFreeBSD = {
|
||||
return isFreeBSD(getCurrentPlatformName())
|
||||
}
|
||||
|
||||
/*********************************************************************************
|
||||
* Returns true if the given platform is Windows.
|
||||
*********************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user