[clang] [clang-cl] Accept `cl`-style output arguments (`/Fo`, `-Fo`) for `--precompile` (PR #121046)

Brad King via cfe-commits cfe-commits at lists.llvm.org
Mon May 12 05:57:21 PDT 2025


================
@@ -14,3 +14,11 @@
 
 //--- test.pcm
 // CPP20WARNING-NOT: clang-cl: warning: argument unused during compilation: '/std:c++20' [-Wunused-command-line-argument]
+
+// test whether the following outputs %Hello.bmi
+// RUN: %clang_cl /std:c++20 --precompile -x c++-module -fmodule-output=%t/Hello.bmi -Fo"%t/Hello.bmi" -c %t/Hello.cppm -### 2>&1 | FileCheck %s
----------------
bradking wrote:

Please don't worry too much about what CMake's command-line invocations [linked above](https://github.com/llvm/llvm-project/pull/121046#discussion_r2038627647) are doing.  CMake doesn't yet support modules with `clang-cl`, and is waiting on the work here.  The command lines I posted over there are showing what *unmerged* changes to CMake are doing in its test suite as part of analyzing why not everything is working.  This PR should focus on the functionality in `clang-cl` and its test should focus on the documented and intended usage.  Once this is merged then CMake can be taught to do the right thing.


https://github.com/llvm/llvm-project/pull/121046


More information about the cfe-commits mailing list