Skip to content

Instantly share code, notes, and snippets.

@big-guy
Created November 15, 2015 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save big-guy/f1f0c8a4eb61febcd27a to your computer and use it in GitHub Desktop.
Save big-guy/f1f0c8a4eb61febcd27a to your computer and use it in GitHub Desktop.
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