Strip the C++ binaries when built via gradle to reduce download size (elastic/elasticsearch#323)
By default this isn't done when building directly with make, so developers should still have debugging symbols in binaries they build themselves Original commit: elastic/x-pack-elasticsearch@64cd92431b
This commit is contained in:
parent
83f2997ee0
commit
155ee948ef
|
@ -55,6 +55,11 @@ task cppMake(type: Exec) {
|
||||||
args '-c', 'source cpp/set_env.sh && ' + make + ' -j' + numCpus
|
args '-c', 'source cpp/set_env.sh && ' + make + ' -j' + numCpus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task cppStrip(type: Exec) {
|
||||||
|
commandLine bash
|
||||||
|
args '-c', 'source cpp/set_env.sh && cpp/strip_binaries.sh'
|
||||||
|
}
|
||||||
|
|
||||||
task cppTest(type: Exec) {
|
task cppTest(type: Exec) {
|
||||||
commandLine bash
|
commandLine bash
|
||||||
args '-c', 'source cpp/set_env.sh && ' + make + ' -j' + numCpus + ' test'
|
args '-c', 'source cpp/set_env.sh && ' + make + ' -j' + numCpus + ' test'
|
||||||
|
@ -63,9 +68,11 @@ task cppTest(type: Exec) {
|
||||||
task cppAll {
|
task cppAll {
|
||||||
dependsOn 'cppObjCompile'
|
dependsOn 'cppObjCompile'
|
||||||
dependsOn 'cppMake'
|
dependsOn 'cppMake'
|
||||||
|
dependsOn 'cppStrip'
|
||||||
dependsOn 'cppTest'
|
dependsOn 'cppTest'
|
||||||
tasks.findByName('cppMake').mustRunAfter 'cppObjCompile'
|
tasks.findByName('cppMake').mustRunAfter 'cppObjCompile'
|
||||||
tasks.findByName('cppTest').mustRunAfter 'cppMake'
|
tasks.findByName('cppStrip').mustRunAfter 'cppMake'
|
||||||
|
tasks.findByName('cppTest').mustRunAfter 'cppStrip'
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
|
Loading…
Reference in New Issue