diff options
author | iannucci@chromium.org <iannucci@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-13 02:07:35 +0000 |
---|---|---|
committer | iannucci@chromium.org <iannucci@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-13 02:08:38 +0000 |
commit | 5a9e71778a0357194e33d27c9802a6979dddbe4d (patch) | |
tree | 82cd3541c6494db1278bb1473439eb11d845d17b /build/gyp_chromium | |
parent | 02a7f63626a073fb9018f0cd4126df3fcfba0fd3 (diff) | |
download | chromium_src-5a9e71778a0357194e33d27c9802a6979dddbe4d.zip chromium_src-5a9e71778a0357194e33d27c9802a6979dddbe4d.tar.gz chromium_src-5a9e71778a0357194e33d27c9802a6979dddbe4d.tar.bz2 |
Revert of Make landmines work on local builds too (patchset #3 of https://codereview.chromium.org/457003004/)
Reason for revert:
Apparently this requires win_toolchain.json to exist, but I'm not sure how it's supposed to get there (as seen on a clobber build):
Traceback (most recent call last):
File "src/build/landmines.py", line 132, in <module>
sys.exit(main())
File "src/build/landmines.py", line 119, in main
gyp_environment.SetEnvironment()
File "C:\b\build\slave\win_trunk\build\src\build\gyp_environment.py", line 33, in SetEnvironment
vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
File "C:\b\build\slave\win_trunk\build\src\build\vs_toolchain.py", line 33, in SetEnvironmentAndGetRuntimeDllDirs
with open(json_data_file, 'r') as tempf:
IOError: [Errno 2] No such file or directory: 'C:\\b\\build\\slave\\win_trunk\\build\\src\\build\\win_toolchain.json'
Original issue's description:
> Make landmines work on local builds too
>
> Moves (some of) gyp environment setup out of gyp_chromium into separate
> module, and shares that between gyp_chromium and landmines.py.
>
> landmines.py is added as the first entry in DEPS hooks so that it can
> clobber the entire build directory before running other hooks that
> extract/generate into the build dir.
>
> R=iannucci@chromium.org
> BUG=400011
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=289099
TBR=scottmg@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=400011
Review URL: https://codereview.chromium.org/469623002
Cr-Commit-Position: refs/heads/master@{#289158}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/gyp_chromium')
-rwxr-xr-x | build/gyp_chromium | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium index 2b2a91a..ccae758 100755 --- a/build/gyp_chromium +++ b/build/gyp_chromium @@ -8,7 +8,7 @@ # is invoked by Chromium beyond what can be done in the gclient hooks. import glob -import gyp_environment +import gyp_helper import os import re import shlex @@ -197,6 +197,10 @@ if __name__ == '__main__': args.append('-Ganalyzer_output_path=' + args.pop(0)) if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)): + # Check for landmines (reasons to clobber the build) in any case. + print 'Running build/landmines.py...' + subprocess.check_call( + [sys.executable, os.path.join(script_dir, 'landmines.py')]) print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.' sys.exit(0) @@ -221,6 +225,8 @@ if __name__ == '__main__': p.communicate() sys.exit(p.returncode) + gyp_helper.apply_chromium_gyp_env() + # This could give false positives since it doesn't actually do real option # parsing. Oh well. gyp_file_specified = False @@ -240,8 +246,6 @@ if __name__ == '__main__': else: args.append(os.path.join(script_dir, 'all.gyp')) - gyp_environment.SetEnvironment() - # There shouldn't be a circular dependency relationship between .gyp files, # but in Chromium's .gyp files, on non-Mac platforms, circular relationships # currently exist. The check for circular dependencies is currently @@ -260,6 +264,21 @@ if __name__ == '__main__': print 'Error: make gyp generator not supported (check GYP_GENERATORS).' sys.exit(1) + # Default to ninja on linux and windows, but only if no generator has + # explicitly been set. + # Also default to ninja on mac, but only when not building chrome/ios. + # . -f / --format has precedence over the env var, no need to check for it + # . set the env var only if it hasn't been set yet + # . chromium.gyp_env has been applied to os.environ at this point already + if sys.platform.startswith(('linux', 'win', 'freebsd')) and \ + not os.environ.get('GYP_GENERATORS'): + os.environ['GYP_GENERATORS'] = 'ninja' + elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \ + not 'OS=ios' in os.environ.get('GYP_DEFINES', []): + os.environ['GYP_GENERATORS'] = 'ninja' + + vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() + # If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check # to enfore syntax checking. syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') @@ -303,7 +322,13 @@ if __name__ == '__main__': gyp_rc = gyp.main(args) if not use_analyzer: - vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() + # Check for landmines (reasons to clobber the build). This must be run here, + # rather than a separate runhooks step so that any environment modifications + # from above are picked up. + print 'Running build/landmines.py...' + subprocess.check_call( + [sys.executable, os.path.join(script_dir, 'landmines.py')]) + if vs2013_runtime_dll_dirs: x64_runtime, x86_runtime = vs2013_runtime_dll_dirs vs_toolchain.CopyVsRuntimeDlls( |