Author: Zequan Wu
Date: 2021-03-18T13:20:47-07:00
New Revision: 1c740b29fae3962a9c8644496352b10798d925ef

URL: 
https://github.com/llvm/llvm-project/commit/1c740b29fae3962a9c8644496352b10798d925ef
DIFF: 
https://github.com/llvm/llvm-project/commit/1c740b29fae3962a9c8644496352b10798d925ef.diff

LOG: [clang-cl] make -ffile-compilation-dir a CoreOption.

Let clang-cl accepts `-ffile-compilation-dir` flag.

Differential Revision: https://reviews.llvm.org/D98887

Added: 
    

Modified: 
    clang/include/clang/Driver/Options.td
    clang/test/Driver/cl-options.c

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Options.td 
b/clang/include/clang/Driver/Options.td
index 9c5013ee88d9..a9b43a8fe620 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -1125,6 +1125,7 @@ def fcoverage_compilation_dir_EQ : Joined<["-"], 
"fcoverage-compilation-dir=">,
     HelpText<"The compilation directory to embed in the coverage mapping.">,
     MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>;
 def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, 
Group<f_Group>,
+    Flags<[CoreOption]>,
     HelpText<"The compilation directory to embed in the debug info and 
coverage mapping.">;
 defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling",
   CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse,

diff  --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c
index 7d83b3d60b1e..90f865d9c7c0 100644
--- a/clang/test/Driver/cl-options.c
+++ b/clang/test/Driver/cl-options.c
@@ -643,6 +643,7 @@
 // RUN:     -fno-diagnostics-color \
 // RUN:     -fdebug-compilation-dir . \
 // RUN:     -fdebug-compilation-dir=. \
+// RUN:     -ffile-compilation-dir=. \
 // RUN:     -fdiagnostics-parseable-fixits \
 // RUN:     -fdiagnostics-absolute-paths \
 // RUN:     -ferror-limit=10 \


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to