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

Unified Diff: build/android/gyp/gcc_preprocess.py

Issue 23717023: Android: Add chrome-specific dynamic linker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove findbugs issues. Created 7 years, 3 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
Index: build/android/gyp/gcc_preprocess.py
diff --git a/build/android/gyp/gcc_preprocess.py b/build/android/gyp/gcc_preprocess.py
index 93efdb3a741dfc0edc035a494c80e811c0edbdd8..eb1a4d156be82568a2faeb8082cb9d530b5f5494 100755
--- a/build/android/gyp/gcc_preprocess.py
+++ b/build/android/gyp/gcc_preprocess.py
@@ -14,8 +14,11 @@ from util import build_utils
def DoGcc(options):
build_utils.MakeDirectory(os.path.dirname(options.output))
- gcc_cmd = [
- 'gcc', # invoke host gcc.
+ gcc_cmd = [ 'gcc' ] # invoke host gcc.
+ if options.D:
+ gcc_cmd.extend(sum(map(lambda w: ['-D', w], options.D), []))
+ gcc_cmd.extend([
+ '-D', 'ANDROID',
'-E', # stop after preprocessing.
'-D', 'ANDROID', # Specify ANDROID define for pre-processor.
'-x', 'c-header', # treat sources as C header files
@@ -23,7 +26,8 @@ def DoGcc(options):
'-I', options.include_path,
'-o', options.output,
options.template
- ]
+ ])
+
build_utils.CheckCallDie(gcc_cmd)
@@ -34,6 +38,7 @@ def main(argv):
parser.add_option('--template', help='Path to template.')
parser.add_option('--output', help='Path for generated file.')
parser.add_option('--stamp', help='Path to touch on success.')
+ parser.add_option('-D', help='Pre-defines macros', action='append')
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
parser.add_option('--ignore', help='Ignored.')

Powered by Google App Engine
This is Rietveld 408576698