zequanwu created this revision. zequanwu added reviewers: thakis, phosek. Herald added subscribers: jansvoboda11, dang. zequanwu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Let clang-cl accepts `-ffile-compilation-dir` flag. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D98887 Files: clang/include/clang/Driver/Options.td clang/test/Driver/cl-options.c Index: clang/test/Driver/cl-options.c =================================================================== --- clang/test/Driver/cl-options.c +++ 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 \ Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -1125,6 +1125,7 @@ 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,
Index: clang/test/Driver/cl-options.c =================================================================== --- clang/test/Driver/cl-options.c +++ 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 \ Index: clang/include/clang/Driver/Options.td =================================================================== --- clang/include/clang/Driver/Options.td +++ clang/include/clang/Driver/Options.td @@ -1125,6 +1125,7 @@ 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,
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits