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

Unified Diff: build/standalone.gypi

Issue 1412193010: Merge to XFA: (Reland) Switch builds to clang by default for Linux and OS X. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 2 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 | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index 507368dc25020967b4a0010a4f60db33a238ce4f..a70b442beeca604c02252897497e6c5063020f45 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -8,6 +8,8 @@
'variables': {
'component%': 'static_library',
'clang%': 0,
+ 'asan%': 0,
+ 'sanitizer_coverage%': 0,
'msvs_multi_core_compile%': '1',
'variables': {
'variables': {
@@ -37,6 +39,7 @@
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
},
+ 'clang_dir%': 'third_party/llvm-build/Release+Asserts',
# These two are needed by V8.
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
@@ -50,6 +53,11 @@
}, {
'os_posix%': 1,
}],
+ ['OS=="linux" or OS=="mac"', {
+ 'clang%': 1,
+ }, {
+ 'clang%': 0,
+ }],
],
},
'target_defaults': {
@@ -249,6 +257,20 @@
'-fPIC',
],
}],
+ ['asan==1', {
+ 'cflags': [
+ '-fsanitize=address',
+ '-gline-tables-only',
+ ],
+ 'ldflags': [
+ '-fsanitize=address',
+ ],
+ }],
+ ['sanitizer_coverage!=0', {
+ 'cflags': [
+ '-fsanitize-coverage=<(sanitizer_coverage)',
+ ],
+ }],
['OS=="win"', {
'defines': [
'NOMINMAX',
@@ -280,5 +302,17 @@
'xcode_settings': {
# See comment in Chromium's common.gypi for why this is needed.
'SYMROOT': '<(DEPTH)/xcodebuild',
- }
+ },
+ 'conditions': [
+ ['OS=="linux" or OS=="mac"', {
+ 'conditions': [
+ ['clang==1', {
+ 'make_global_settings': [
+ ['CC', '<(clang_dir)/bin/clang'],
+ ['CXX', '<(clang_dir)/bin/clang++'],
+ ],
+ }],
+ ],
+ }], # OS=="linux" or OS=="mac"
+ ],
}
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698