From f4511aec2bf482f2ae5bbd14138a229b72c41c80 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 16 Dec 2020 13:28:28 +0100 Subject: [PATCH] [clang][cli] Port HeaderSearch simple string options to new option parsing system Depends on D84669 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84670 --- clang/include/clang/Driver/Options.td | 21 ++++++++++++++------- clang/lib/Frontend/CompilerInvocation.cpp | 12 ------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 9987143..7275e84 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1797,7 +1797,8 @@ def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group, HelpText<"Specify the module cache path">; def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group, Flags<[NoXarchOption, CC1Option]>, MetaVarName<"">, - HelpText<"Specify the module user build path">; + HelpText<"Specify the module user build path">, + MarshallingInfoString<"HeaderSearchOpts->ModuleUserBuildPath">; def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group, Flags<[NoXarchOption, CC1Option]>, MetaVarName<"">, HelpText<"Specify the prebuilt module path">; @@ -1806,16 +1807,19 @@ defm prebuilt_implicit_modules : OptInFFlag<"prebuilt-implicit-modules", [NoXarchOption, CC1Option], "HeaderSearchOpts->EnablePrebuiltImplicitModules">; def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group, Flags<[CC1Option]>, MetaVarName<"">, - HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">; + HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">, + MarshallingInfoStringInt<"HeaderSearchOpts->ModuleCachePruneInterval", "7 * 24 * 60 * 60">; def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group, Flags<[CC1Option]>, MetaVarName<"">, - HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">; + HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">, + MarshallingInfoStringInt<"HeaderSearchOpts->ModuleCachePruneAfter", "31 * 24 * 60 * 60">; def fmodules_search_all : Flag <["-"], "fmodules-search-all">, Group, Flags<[NoXarchOption, CC1Option]>, HelpText<"Search even non-imported modules to resolve references">; def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">, Group, Flags<[CC1Option]>, MetaVarName<"