Commit 2620f760 authored by bmeurer's avatar bmeurer Committed by Commit bot

Fix ninja build with clang=1.

Review URL: https://codereview.chromium.org/862313002

Cr-Commit-Position: refs/heads/master@{#26211}
parent c883aed7
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
'includes': ['toolchain.gypi'], 'includes': ['toolchain.gypi'],
'variables': { 'variables': {
'component%': 'static_library', 'component%': 'static_library',
'make_clang_dir%': '../third_party/llvm-build/Release+Asserts', 'clang_dir%': 'third_party/llvm-build/Release+Asserts',
'clang_xcode%': 0, 'clang_xcode%': 0,
'visibility%': 'hidden', 'visibility%': 'hidden',
'v8_enable_backtrace%': 0, 'v8_enable_backtrace%': 0,
...@@ -487,10 +487,19 @@ ...@@ -487,10 +487,19 @@
}, # target_defaults }, # target_defaults
}], # OS=="mac" }], # OS=="mac"
['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
'and OS!="win"', { 'and OS!="win" and "<(GENERATOR)"=="make"', {
'make_global_settings': [ 'make_global_settings': [
['CC', '<(make_clang_dir)/bin/clang'], ['CC', '../<(clang_dir)/bin/clang'],
['CXX', '<(make_clang_dir)/bin/clang++'], ['CXX', '../<(clang_dir)/bin/clang++'],
['CC.host', '$(CC)'],
['CXX.host', '$(CXX)'],
],
}],
['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
'and OS!="win" and "<(GENERATOR)"=="ninja"', {
'make_global_settings': [
['CC', '<(clang_dir)/bin/clang'],
['CXX', '<(clang_dir)/bin/clang++'],
['CC.host', '$(CC)'], ['CC.host', '$(CC)'],
['CXX.host', '$(CXX)'], ['CXX.host', '$(CXX)'],
], ],
...@@ -498,7 +507,7 @@ ...@@ -498,7 +507,7 @@
['clang==1 and OS=="win"', { ['clang==1 and OS=="win"', {
'make_global_settings': [ 'make_global_settings': [
# On Windows, gyp's ninja generator only looks at CC. # On Windows, gyp's ninja generator only looks at CC.
['CC', '<(make_clang_dir)/bin/clang-cl'], ['CC', '../<(clang_dir)/bin/clang-cl'],
], ],
}], }],
# TODO(yyanagisawa): supports GENERATOR==make # TODO(yyanagisawa): supports GENERATOR==make
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment