Reason for revert:
This break developer workflow for Googlers (as build/mac/should_use_hermetic_xcode.py returns 1) as the hermetic build does not contains support for iOS SDK, thus "gn gen" fails with the following error:
$ gn gen --args='target_os="ios"' out/default
ERROR at //build/config/ios/ios_sdk.gni:98:21: Script returned non-zero exit code.
_ios_sdk_result = exec_script(script_name, ios_sdk_info_args, "scope")
^----------
Current dir: /Users/sdefresne/Developer/chromium/src/out/default/
Command: python -- /Users/sdefresne/Developer/chromium/src/build/config/mac/sdk_info.py --developer_dir /Users/sdefresne/Developer/chromium/src/build/mac_files/Xcode.app iphonesimulator
Returned 1.
stderr:
xcodebuild: error: SDK "iphonesimulator" cannot be located.
xcodebuild: error: SDK "iphonesimulator" cannot be located.
xcrun: error: unable to lookup item 'Path' in SDK 'iphonesimulator'
The was not caught by the bots because they do not set FORCE_MAC_TOOLCHAIN and are not corporate machine.
Original issue's description:
> Turn on hermetic toolchain for all corp machines.
>
> BUG=659726
>
> Committed: https://crrev.com/7778e931dabc1fa85d0b77321e3fdef166e0b6a0
> Cr-Commit-Position: refs/heads/master@{#430376}
TBR=thakis@chromium.org,dpranke@chromium.org,brettw@chromium.org,justincohen@chromium.org,erikchen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=659726
Review-Url: https://codereview.chromium.org/2487643002
Cr-Original-Commit-Position: refs/heads/master@{#430553}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e62f1a5d8886fc1086a180f4da94e0a3d1ca03dc
Rename build/config/mac/gen_plist.py to build/config/mac/plist_util.py
after splitting the possible action (currently variable substitution and
plist merging).
Extend tweak_info_plist template to add another parameter info_plists
corresponding to a list of path to merge before tweaking (this allow for
adding partial plist files depending on configuration options).
Always pass the --platform variable based on the value of $current_os
to the tweak_info_plist template and make args optional.
Refactor info_plist template to use separate steps for merge and variable
substitution (as the script now implement them as two separate actions).
BUG=613543
Review-Url: https://codereview.chromium.org/2480433002
Cr-Original-Commit-Position: refs/heads/master@{#429830}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9bb379e5fbd071abaf1359d724eb79b1ff6e7ceb
This ensures that the hermetic toolchain is only used if use_system_xcode is
false. This CL also causes two changes:
* svn is assumed to be installed on the system. It is not pulled from the
hermetic toolchain.
* mac_sdk_build was used to populate the SDK version in the Info.plist. This
was being populated with a different version than the SDK being used to build
Chrome, which is incorrect.
BUG=651267
Review-Url: https://codereview.chromium.org/2412353003
Cr-Original-Commit-Position: refs/heads/master@{#425170}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6218c34684254f1c090bf501f6c46b0a69b63ec5
If the --verify flag is passed to //build/mac/find_sdk.py and the SDK
is not installed, the script must fail with a non zero return code or
gn will consider that the script was successful and will discard its
stderr.
Fixes the following error when trying to generate official chrome
branded build with Xcode 8 (that does not ship with macOS 10.10 SDK):
ERROR at //build/config/mac/mac_sdk.gni:43:34: Array subscript out of range.
mac_sdk_version = find_sdk_lines[1]
^
You gave me 1 but I was expecting something from 0 to 1, inclusive.
BUG=634373
Review-Url: https://codereview.chromium.org/2218773004
Cr-Original-Commit-Position: refs/heads/master@{#410529}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c301ead9cb14859d0e4187a7170eeb4fd6b99aec
The current version for breakpad in crash reports is CFBundleShortVersionString
It should be long version.
BUG=626490
Review-Url: https://codereview.chromium.org/2132913003
Cr-Original-Commit-Position: refs/heads/master@{#408953}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b0959ee3fc34de2a87f0dce5fc29bddb314da576
Chrome on iOS uses different format by default for the "CFBundleVersion"
and "CFBundleShortVersionString" Info.plist values.
Change _AddVersionKeys function to take as parameter a dictionary from
Info.plist keys to version format using @MAJOR@, @MINOR@, @BUILD@ and
@PATCH@ patterns to represent the different component of the version,
and pass a different dictionary depending on the platform.
Refactor how the version is extracted using the build/util/version.py
script (it was invoked twice, but the second invocation can be removed
as the output needs to be post-processed).
BUG=502295,616750
Review-Url: https://codereview.chromium.org/2044893002
Cr-Original-Commit-Position: refs/heads/master@{#398323}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8001eee13920c32ca685f6700bbe2db77eed8046
In order to allow Chrome on iOS to use build/mac/tweak_info_plist.py,
add options required to control the format of the generated plist file
(--format), the product reported to breakpad (--platform) and a way to
override some portion of the version string (--version-overrides).
This is required to allow Chrome on iOS to migrate from it old fork of
tweak_info_plist shell script and to incorporate tweak_info_plist.py
in the GN build.
BUG=502295
Review-Url: https://codereview.chromium.org/2037043002
Cr-Original-Commit-Position: refs/heads/master@{#397745}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 77bf6652e84cfb17925382598e9e50873065b3c2
Use xcrun instead of xcodebuild if --print_sdk_path is passed. Reduces time
to run `gn gen` from 2.2s to 1.95s on my MacBook Pro.
(In the gyp build, we don't pass --print_sdk_path to this script, so I didn't
notice this script had this slow path until now.)
While here, also stop pretending that we support Xcodes older than 4.3.
BUG=609541
Review-Url: https://codereview.chromium.org/1988023006
Cr-Original-Commit-Position: refs/heads/master@{#394565}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d50140bae570f519cea29a8b20e58511032cbfd7
This was only used to mark executable as non-PIE. After the non-PIE Chromium
helper was removed, the last remaining use was for Valgrind. But Valgrind
support was also recently removed, so this can go away entirely.
change_mach_o_flags.py did explicitly set the MH_NO_HEAP_EXECUTION flag on
executables, but this is not necessary on x86_64 where the architecture default
is to not have an executable heap.
BUG=520680
Review URL: https://codereview.chromium.org/1885593003
Cr-Original-Commit-Position: refs/heads/master@{#387007}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 806f385a1f9c2814de91bd1a98a50e74c4fa9a81
Instead, pass the --plist to tweak on the command line. This way the
script can be used in both GYP and GN builds.
There is one behavior change: previously passing --keystone=1 would only
insert the Keystone keys if env['CONFIGURATION']=='Release' and after this
change, the keys will be added regardless of the build configuration if the
flag is passed.
BUG=297668
Review URL: https://codereview.chromium.org/1881053002
Cr-Original-Commit-Position: refs/heads/master@{#386854}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: adf34911dcb45fab4d7e13c4d7ef43e3dea840eb
32-bit support was dropped in Chrome 39, a year ago. It seems like a
good time to stop carrying this stuff around.
Review URL: https://codereview.chromium.org/1438313003
Cr-Original-Commit-Position: refs/heads/master@{#360153}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c5af6de2b6499645244d173f841b4013f3c60a56
It is no longer clear if we will be adding more helper variants in the
near future. This change removes any additional dead code related to the
helper apps.
BUG=520680
Review URL: https://codereview.chromium.org/1354703002
Cr-Original-Commit-Position: refs/heads/master@{#349970}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0c619649467faa44c72db1ddfabbf59e535b4d31
On OS X, there are currently Google Chrome Helper EH.app and
Google Chrome Helper NP.app, which are no longer used with the deprecation
of NPAPI. This changes removes the helpers, both from the build process,
and any code referring to them.
The make_more_helpers.sh is now a no-op, but is left in because it will
soon be needed for the Library Validation feature (to generate
Google Chrome Helper NLV.app).
BUG=520680
Review URL: https://codereview.chromium.org/1315163004
Cr-Original-Commit-Position: refs/heads/master@{#347235}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f5ed554ef814418d64510aa18b43b69315e40814
W0105: 16,-1: String statement has no effect
C0323: 45,4:main: Operator not followed by a space
print >>sys.stderr, out
^
BUG=
Review URL: https://codereview.chromium.org/539843002
Cr-Original-Commit-Position: refs/heads/master@{#293294}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9520d408282a2a498ef6fc20f9abacfb899abbe7
full installer is desired.
Formerly, the tag identified only the channel that Chrome was on. The tag is
being enhanced to detect the CPU's bitness (adding "-32bit" for 32-bit-only,
non-64-bit-capable CPUs) and whether a full (as opposed to binary diff patch)
update is requested (adding "-full").
CPU bitness detection ought to be a feature of Keystone, but Keystone uses the
NXGetLocalArchInfo to determine the CPU type, and winds up always reporting
"i486". The "-32bit" tag suffix will be present whenever the
"hw.cpu64bit_capable" sysctl name is not found or has value 0. This enables
proper detection of users who are capable of running 64-bit Chrome on the
server side.
When a binary diff patch update application fails in dirpatcher, typically the
result of modifications made to existing installations, the "-full" tag suffix
will be set. On a subsequent update attempt, the server can detect this value
and provide the client with a full updater package, which does not depend on
the existing installation. The "-full" tag suffix is cleared on successful
update installation.
BUG=18323,54047,225352,303280,316916
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/102963007
git-svn-id: http://src.chromium.org/svn/trunk/src/build@242964 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In Xcode 5, strip is no longer in SYSTEM_DEVELOPER_BIN_DIR. It is only in
DT_TOOLCHAIN_DIR. I also checked Xcode 4.6.1 and found that DT_TOOLCHAIN_DIR
was also set there, and strip is in both SYSTEM_DEVELOPER_BIN_DIR and
DT_TOOLCHAIN_DIR in that version.
Environment variables as set when Xcode is installed at /Applications/Xcode.app:
SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefa
ult.xctoolchain
xcrun should be able to find strip without having to resort to manual
environment interpretation.
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/24352006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@227787 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
When the SDK is set to something that Xcode doesn't know about (such as 10.6),
xcrun doesn't work correctly.
mark@cougar bash$ xcrun strip
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: no files specified
mark@cougar bash$ SDKROOT=/SDKs/MacOSX10.6.sdk xcrun strip
xcodebuild: error: SDK "/SDKs/MacOSX10.6.sdk" cannot be located.
xcrun: error: unable to find utility "strip", not a developer tool or in PATH
> Run strip via xcrun.
>
> In Xcode 5, strip is no longer in SYSTEM_DEVELOPER_BIN_DIR. It is only in
> DT_TOOLCHAIN_DIR. I also checked Xcode 4.6.1 and found that DT_TOOLCHAIN_DIR
> was also set there, and strip is in both SYSTEM_DEVELOPER_BIN_DIR and
> DT_TOOLCHAIN_DIR in that version.
>
> Environment variables as set when Xcode is installed at /Applications/Xcode.app:
>
> SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
> DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefa
> ult.xctoolchain
>
> xcrun should be able to find strip without having to resort to manual
> environment interpretation.
>
> R=thakis@chromium.org
>
> Review URL: https://codereview.chromium.org/24352006TBR=mark@chromium.org
Review URL: https://codereview.chromium.org/26235007
git-svn-id: http://src.chromium.org/svn/trunk/src/build@227524 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In Xcode 5, strip is no longer in SYSTEM_DEVELOPER_BIN_DIR. It is only in
DT_TOOLCHAIN_DIR. I also checked Xcode 4.6.1 and found that DT_TOOLCHAIN_DIR
was also set there, and strip is in both SYSTEM_DEVELOPER_BIN_DIR and
DT_TOOLCHAIN_DIR in that version.
Environment variables as set when Xcode is installed at /Applications/Xcode.app:
SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefa
ult.xctoolchain
xcrun should be able to find strip without having to resort to manual
environment interpretation.
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/24352006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@227347 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The action will copy the ASan dynamic runtime to the output dir and into every
bundled executable being built.
Unlike the previous change, this one does not touch build/all.gyp, since our target
doesn't need to be built when building 'All'.
BUG=170629
TBR=thakis,mark
Review URL: https://codereview.chromium.org/12685006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187566 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
SDK to verify when an SDK path is set. The SDK path supersedes whatever
find_sdk is supposed to find.
Also: Reorganize the SDK and deployment target variables to be scoped more
appropriately. Add a mac_sdk_min variable to set the main argument to
find_sdk.
Review URL: https://chromiumcodereview.appspot.com/11068023
git-svn-id: http://src.chromium.org/svn/trunk/src/build@160536 4ff67af0-8c30-449e-8e8b-ad334ec8d88c