[GN] Fix generate Xcode project for macOS to work with Xcode 8. Overridding ARCHS prevents Xcode 8+ from running the compiled binary on macOS. In addition avoid hard-coding the version of the SDK to use (since we do not build with Xcode this value is unused) and instead mention that the version-less SDK. BUG=634501 Review-Url: https://codereview.chromium.org/2542613002 Cr-Original-Commit-Position: refs/heads/master@{#435483} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5d7f4cee65382c428e9d08112354a8a9bd496aa9
diff --git a/tools/gn/xcode_writer.cc b/tools/gn/xcode_writer.cc index bce396b..09f62db 100644 --- a/tools/gn/xcode_writer.cc +++ b/tools/gn/xcode_writer.cc
@@ -42,25 +42,6 @@ return XcodeWriter::WRITER_TARGET_OS_MACOS; } -std::string GetArchs(const Args& args) { - const Value* target_cpu_value = args.GetArgOverride(variables::kTargetCpu); - if (target_cpu_value) { - if (target_cpu_value->type() == Value::STRING) { - if (target_cpu_value->string_value() == "x86") - return "i386"; - if (target_cpu_value->string_value() == "x64") - return "x86_64"; - if (target_cpu_value->string_value() == "arm") - return "armv7"; - if (target_cpu_value->string_value() == "armv7") - return "armv7"; - if (target_cpu_value->string_value() == "arm64") - return "armv64"; - } - } - return "x86_64"; -} - std::string GetBuildScript(const std::string& target_name, const std::string& build_path, const std::string& ninja_extra_args) { @@ -157,8 +138,7 @@ attributes["TARGETED_DEVICE_FAMILY"] = "1,2"; break; case XcodeWriter::WRITER_TARGET_OS_MACOS: - attributes["ARCHS"] = GetArchs(build_settings->build_args()); - attributes["SDKROOT"] = "macosx10.11"; + attributes["SDKROOT"] = "macosx"; break; }