-
-
Save big-guy/f1f0c8a4eb61febcd27a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model { | |
toolChains { | |
clang(Clang) { | |
eachPlatform { | |
linker.withArguments { args -> | |
def filelist = file("build/tmp/${args.hashCode()}.txt") | |
def objects = args.findAll { it.endsWith(".o") } | |
def writer = filelist.newWriter() | |
objects.each { o -> | |
writer.write(o) | |
writer.newLine() | |
} | |
writer.close() | |
args.removeAll(objects) | |
args.add("-Wl,-filelist,$filelist") | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment