Only set the syncbase --host arm-apple-darwin when building for arm
devices, and not amd64 devices.
Change-Id: Id3bc27840f7b1f299426ea594115220f9ee5f895
diff --git a/jiri-profile-v23/syncbase_profile/syncbase.go b/jiri-profile-v23/syncbase_profile/syncbase.go
index 9717f48..a7e1662 100644
--- a/jiri-profile-v23/syncbase_profile/syncbase.go
+++ b/jiri-profile-v23/syncbase_profile/syncbase.go
@@ -306,13 +306,15 @@
iosFlags := fmt.Sprintf("-m%v-version-min=%v -isysroot %v", minVersionEnvFlag, deploymentTarget, sysroot)
env := map[string]string{
"IPHONEOS_DEPLOYMENT_TARGET": deploymentTarget,
- "TARGET": "arm-apple-darwin", // this is true for 32 and 64-bits
"CFLAGS": fmt.Sprintf("%v -arch %v", iosFlags, iosArch),
"CXXFLAGS": fmt.Sprintf("%v -arch %v", iosFlags, iosArch),
"LDFLAGS": iosFlags,
"CC": clangPath,
"CXX": clangxxPath,
}
+ if sdkName == "iphoneos" {
+ env["TARGET"] = "arm-apple-darwin" // this is true for 32 and 64-bits
+ }
return env, nil
}
@@ -366,7 +368,9 @@
return err
}
env = envvar.MergeMaps(env, clangEnv)
- args = append(args, "--host="+clangEnv["TARGET"])
+ if target, ok := clangEnv["TARGET"]; ok {
+ args = append(args, "--host="+target)
+ }
case target.OS() == "fnl" && target.Arch() == "amd64" && runtime.GOOS == "linux":
fnlRoot := os.Getenv("FNL_JIRI_ROOT")
if len(fnlRoot) == 0 {