Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: build/landmines.py

Issue 2071463002: Simplify landmines code a bit now that all branches of all platforms are on ninja (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for reland Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/landmine_utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/landmines.py
diff --git a/build/landmines.py b/build/landmines.py
index 031c309c33a96132ab43198f15e31b8c6443eb10..1b2f1cdbb08965adbdf0be2ad7e1bbb16b83b99a 100755
--- a/build/landmines.py
+++ b/build/landmines.py
@@ -27,35 +27,28 @@ import clobber
import landmine_utils
-def get_build_dir(build_tool, src_dir, is_iphone=False):
+def get_build_dir(src_dir):
"""
Returns output directory absolute path dependent on build and targets.
Examples:
r'c:\b\build\slave\win\build\src\out'
'/mnt/data/b/build/slave/linux/build/src/out'
- '/b/build/slave/ios_rel_device/build/src/xcodebuild'
+ '/b/build/slave/ios_rel_device/build/src/out'
Keep this function in sync with tools/build/scripts/slave/compile.py
"""
- ret = None
- if build_tool == 'xcode':
- ret = os.path.join(src_dir, 'xcodebuild')
- elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios.
- if 'CHROMIUM_OUT_DIR' in os.environ:
- output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
- if not output_dir:
- raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
- else:
- output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
- ret = os.path.join(src_dir, output_dir)
+ if 'CHROMIUM_OUT_DIR' in os.environ:
+ output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
+ if not output_dir:
+ raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
else:
- raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool)
- return os.path.abspath(ret)
+ output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
+ return os.path.abspath(os.path.join(src_dir, output_dir))
def clobber_if_necessary(new_landmines, src_dir):
"""Does the work of setting, planting, and triggering landmines."""
- out_dir = get_build_dir(landmine_utils.builder(), src_dir)
+ out_dir = get_build_dir(src_dir)
landmines_path = os.path.normpath(os.path.join(src_dir, '.landmines'))
try:
os.makedirs(out_dir)
@@ -129,9 +122,6 @@ def process_options():
def main():
options = process_options()
- if landmine_utils.builder() in ('dump_dependency_json', 'eclipse'):
- return 0
-
gyp_environment.SetEnvironment()
landmines = []
« no previous file with comments | « build/landmine_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698