Skip to content

Commit

Permalink
Broken attempt at -as-needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Sep 22, 2024
1 parent 787c053 commit c4baefb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions photon-targeting/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ model {
}
}
}

}
testSuites {
"${nativeName}Test"(GoogleTestTestSuiteSpec) {
Expand Down Expand Up @@ -148,6 +149,19 @@ model {
}
}

binaries {
withType(NativeBinarySpec).all {
if (it.toolChain instanceof VisualCpp) {
// TODO
}

if (it.toolChain instanceof GccCompatibleToolChain) {
// Ends up appending this flag, not prepending
it.linker.args '-Wl,--as-needed'
}
}
}

tasks {
def c = $.testSuites
project.tasks.create('runCpp', Exec) {
Expand Down

0 comments on commit c4baefb

Please sign in to comment.