build: simplify clang(++) configuration

also introduce 'execClang' block
This commit is contained in:
Svyatoslav Scherbina
2016-11-08 11:34:30 +07:00
committed by SvyatoslavScherbina
parent 4e5e7d37ee
commit 55f8257f92
7 changed files with 75 additions and 24 deletions
+2 -3
View File
@@ -105,20 +105,19 @@ String[] linkerOpts1() {
+ ["-L$libffiDir/lib", "-lffi"])
ArrayList<String> strldflags = new ArrayList<>()
ldflags.forEach{strldflags.add(it.toString())}
strldflags.add("-B$sysrootDir/usr/bin".toString())
return strldflags.toArray(new String[0])
}
kotlinNativeInterop {
llvm {
defFile 'llvm.def'
compilerOpts "-fPIC", "-I$llvmDir/include", "-B$sysrootDir/usr/bin"
compilerOpts "-fPIC", "-I$llvmDir/include"
linkerOpts linkerOpts1()
}
hash { // TODO: copy-pasted from ':common:compileHash'
compilerOpts '-fPIC'
linkerOpts '-fPIC', "-B$sysrootDir/usr/bin"
linkerOpts '-fPIC'
linker 'clang++'
linkOutputs ':common:compileHash'