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

Side by Side Diff: pylib/gyp/generator/xcode.py

Issue 54993002: Use xcrun instead of DEVELOPER_BIN_DIR to deal with tools that keep moving around (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | pylib/gyp/mac_tool.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import filecmp 5 import filecmp
6 import gyp.common 6 import gyp.common
7 import gyp.xcodeproj_file 7 import gyp.xcodeproj_file
8 import errno 8 import errno
9 import os 9 import os
10 import sys 10 import sys
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 # in parallel. Don't use ncpus because Xcode will build ncpus targets 1025 # in parallel. Don't use ncpus because Xcode will build ncpus targets
1026 # in parallel and if each target happens to have a rules step, there 1026 # in parallel and if each target happens to have a rules step, there
1027 # would be ncpus^2 things going. With a machine that has 2 quad-core 1027 # would be ncpus^2 things going. With a machine that has 2 quad-core
1028 # Xeons, a build can quickly run out of processes based on 1028 # Xeons, a build can quickly run out of processes based on
1029 # scheduling/other tasks, and randomly failing builds are no good. 1029 # scheduling/other tasks, and randomly failing builds are no good.
1030 script = \ 1030 script = \
1031 """JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)" 1031 """JOB_COUNT="$(/usr/sbin/sysctl -n hw.ncpu)"
1032 if [ "${JOB_COUNT}" -gt 4 ]; then 1032 if [ "${JOB_COUNT}" -gt 4 ]; then
1033 JOB_COUNT=4 1033 JOB_COUNT=4
1034 fi 1034 fi
1035 exec "${DEVELOPER_BIN_DIR}/make" -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}" 1035 exec xcrun make -f "${PROJECT_FILE_PATH}/%s" -j "${JOB_COUNT}"
1036 exit 1 1036 exit 1
1037 """ % makefile_name 1037 """ % makefile_name
1038 ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ 1038 ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({
1039 'name': 'Rule "' + rule['rule_name'] + '"', 1039 'name': 'Rule "' + rule['rule_name'] + '"',
1040 'shellScript': script, 1040 'shellScript': script,
1041 'showEnvVarsInLog': 0, 1041 'showEnvVarsInLog': 0,
1042 }) 1042 })
1043 1043
1044 if support_xct: 1044 if support_xct:
1045 support_xct.AppendProperty('buildPhases', ssbp) 1045 support_xct.AppendProperty('buildPhases', ssbp)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 1215
1216 for build_file in build_files: 1216 for build_file in build_files:
1217 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests) 1217 xcode_projects[build_file].Finalize1(xcode_targets, serialize_all_tests)
1218 1218
1219 for build_file in build_files: 1219 for build_file in build_files:
1220 xcode_projects[build_file].Finalize2(xcode_targets, 1220 xcode_projects[build_file].Finalize2(xcode_targets,
1221 xcode_target_to_target_dict) 1221 xcode_target_to_target_dict)
1222 1222
1223 for build_file in build_files: 1223 for build_file in build_files:
1224 xcode_projects[build_file].Write() 1224 xcode_projects[build_file].Write()
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/mac_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698