clang: Instead of having update.sh clobber out/, add a define with the current revision.
When clang is turned on or off, or when clang is updated, all .o files and all precompiled headers need to be rebuilt. This is currently done by having the update script remove the out/ directory. This has issues: * It fails to catch build directories with different names (e.g. out_android) * It removes other build artifacts (like resources) that don't need rebuilding * It doesn't happen when turning clang off (i.e. moving clang -> gcc). Instead, let common.gypi add a define with the current clang revision to each source file. This way, the clang revision is on each compile's command line and the build system's commandline tracking can take care of the rebuilding. BUG=nativeclient:3840 NOTRY=true Review URL: https://codereview.chromium.org/268363020 git-svn-id: http://src.chromium.org/svn/trunk/src/build@269427 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
68a08bb56e
Коммит
db3b2975f1
|
@ -2313,6 +2313,14 @@
|
|||
],
|
||||
},
|
||||
}],
|
||||
['clang==1 and OS!="win"', {
|
||||
# This is here so that all files get recompiled after a clang roll and
|
||||
# when turning clang on or off.
|
||||
# (defines are passed via the command line, and build systems rebuild
|
||||
# things when their commandline changes). Nothing should ever read this
|
||||
# define.
|
||||
'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'],
|
||||
}],
|
||||
['enable_rlz==1', {
|
||||
'defines': ['ENABLE_RLZ'],
|
||||
}],
|
||||
|
|
Загрузка…
Ссылка в новой задаче