mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-1209: Support for building natives from a release.
This commit is contained in:
@@ -108,17 +108,27 @@ def shouldSkipNative(task) {
|
||||
}
|
||||
|
||||
/*******************************************************************************************
|
||||
* Task Rule : builds all the natives in this module for a given platform.
|
||||
* Task Rule : buildNatives[_PlatformName]
|
||||
*
|
||||
* Example : gradle buildNatives_win_x86_64 will build all win_x86_64 native executables and shared libraries.
|
||||
* Summary: Builds all the natives in this module for a given platform.
|
||||
*
|
||||
* Args: PlatformName - The name of the platform. If not specified, the current platform is used.
|
||||
*
|
||||
* Example: gradle buildNatives_win_x86_64 will build all win_x86_64 native executables and shared libraries.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
******************************************************************************************/
|
||||
tasks.addRule("Pattern: buildNatives_<platform name>]: build all natives for given platform") { String taskName ->
|
||||
tasks.addRule("Pattern: buildNatives[_PlatformName]: build all natives for given platform") { String taskName ->
|
||||
|
||||
if (taskName.startsWith("buildNatives_")) {
|
||||
String platform = taskName - "buildNatives_"
|
||||
if (taskName.startsWith("buildNatives")) {
|
||||
String currentPlatform = getCurrentPlatformName()
|
||||
String platform = taskName - "buildNatives"
|
||||
if (platform.length() == 0) {
|
||||
platform = currentPlatform
|
||||
}
|
||||
if (platform.startsWith("_")) {
|
||||
platform = platform - "_"
|
||||
}
|
||||
|
||||
task(taskName) { myTask ->
|
||||
|
||||
@@ -157,20 +167,30 @@ tasks.addRule("Pattern: buildNatives_<platform name>]: build all natives for giv
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************************
|
||||
* Task Rule : builds all the natives in this module for a given platform and copies the
|
||||
* results to the bin repo.
|
||||
/*******************************************************************************************
|
||||
* Task Rule : prebuildNatives[_PlatformName]
|
||||
*
|
||||
* Example : gradle prebuildNatives_win_x86_64 will build all win_x86_64 native executables and shared
|
||||
* libraries and copy the results to the appropriate project/os directory in the bin
|
||||
* repo.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
* Summary: Builds all the natives in this module for a given platform and copies the results
|
||||
* to the bin repo.
|
||||
*
|
||||
* Args: PlatformName - The name of the platform. If not specified, the current platform is used.
|
||||
*
|
||||
* Example: gradle prebuildNatives_win_x86_64 will build all win_x86_64 native executables and
|
||||
* shared libraries and copy the results to the appropriate project/os directory in
|
||||
* the bin repo.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
******************************************************************************************/
|
||||
tasks.addRule("Pattern: prebuildNatives_<platform name>]: build all natives for given platform") { String taskName ->
|
||||
if (taskName.startsWith("prebuildNatives_")) {
|
||||
String platform = taskName - "prebuildNatives_"
|
||||
tasks.addRule("Pattern: prebuildNatives<_platform name>]: build all natives for given platform") { String taskName ->
|
||||
if (taskName.startsWith("prebuildNatives")) {
|
||||
def currentPlatform = getCurrentPlatformName()
|
||||
def platform = taskName - "prebuildNatives"
|
||||
if (platform.length() == 0) {
|
||||
platform = currentPlatform
|
||||
}
|
||||
if (platform.startsWith("_")) {
|
||||
platform = platform - "_"
|
||||
}
|
||||
|
||||
task(taskName) { myTask ->
|
||||
dependsOn "buildNatives_$platform"
|
||||
@@ -214,8 +234,7 @@ gradle.taskGraph.whenReady {
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* The following block of code ensures that the buildNatives_<platform> task is used
|
||||
* during assembly to ensure that missing toolchain generates an appropriate error
|
||||
* The following block of code ensures that the buildNatives (for current plaform) task is
|
||||
* used during assembly to ensure that missing toolchain generates an appropriate error
|
||||
****************************************************************************************/
|
||||
def currentPlatform = getCurrentPlatformName()
|
||||
assemble.dependsOn "buildNatives_$currentPlatform"
|
||||
assemble.dependsOn "buildNatives"
|
||||
|
||||
Reference in New Issue
Block a user