From 19e6acbd51b45cf549387790fe8c51691cf30fc1 Mon Sep 17 00:00:00 2001 From: Ben Langmuir Date: Fri, 1 Aug 2014 22:12:21 +0000 Subject: [PATCH] Add -fbuild-session-file as an alternative to -fbuild-session-timestamp Build systems tend to traffic in files and modification times, so having them touch a file at the beginning of the build can be easier than having them update the compile command they use every time they build. llvm-svn: 214577 --- clang/include/clang/Basic/DiagnosticDriverKinds.td | 2 +- clang/include/clang/Driver/Options.td | 3 +++ clang/lib/Driver/Tools.cpp | 16 +++++++++++++++- clang/test/Driver/modules.m | 20 +++++++++++++++++--- 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td index e2afd6c..7202548 100644 --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -175,7 +175,7 @@ def err_analyzer_config_multiple_values : Error< def err_drv_modules_validate_once_requires_timestamp : Error< "option '-fmodules-validate-once-per-build-session' requires " - "'-fbuild-session-timestamp='">; + "'-fbuild-session-timestamp=' or '-fbuild-session-file='">; def warn_drv_invoking_fallback : Warning<"falling back to %0">, InGroup; diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index f799720..a32d932 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -617,6 +617,9 @@ def fmodules_search_all : Flag <["-"], "fmodules-search-all">, Group, def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">, Group, Flags<[CC1Option]>, MetaVarName<"