Fix clang usage in backend.native:tests
For Apple Silicon targets we need to call Clang 1. From toolchain because the one from our distro is too old. 2. With appropriate flags for setting the sysroot.
This commit is contained in:
committed by
TeamCityServer
parent
437a0aa450
commit
7b06249e7f
@@ -4214,7 +4214,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/smoke.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcsmoke.dylib"
|
||||
@@ -4240,7 +4240,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args fileTree("$projectDir/interop/objc/tests/") { include '**/*.m' }
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjctests.dylib"
|
||||
@@ -4260,7 +4260,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc_with_initializer/objc_misc.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcmisc.dylib"
|
||||
@@ -4277,7 +4277,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/msg_send/messaging.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcmessaging.dylib"
|
||||
@@ -4295,7 +4295,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/foreignException/objc_wrap.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcexception.dylib"
|
||||
@@ -4314,7 +4314,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/foreignException/objc_wrap.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcexception.dylib"
|
||||
@@ -4333,7 +4333,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/foreignException/objc_wrap.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjcexception.dylib"
|
||||
@@ -4372,7 +4372,7 @@ if (PlatformInfo.isAppleTarget(project)) {
|
||||
|
||||
doBeforeBuild {
|
||||
mkdir(buildDir)
|
||||
execKonanClang(project.target) {
|
||||
execClangForCompilerTests(project.target) {
|
||||
args "$projectDir/interop/objc/kt42172/objclib.m"
|
||||
args "-lobjc", '-fobjc-arc'
|
||||
args '-fPIC', '-shared', '-o', "$buildDir/libobjc_kt42172.dylib"
|
||||
|
||||
Reference in New Issue
Block a user