[Driver] [Modules] Support -fmodule-output (1/2)
Patches to support the one-phase compilation model for modules. The behavior: (1) If -o and -c is specified , the module file is in the same path within the same directory as the output the -o specified and with a new suffix .pcm. (2) Otherwise, the module file is in the same path within the working directory directory with the name of the input file with a new suffix .pcm For example, ``` Hello.cppm Use.cpp ``` A trivial one and the contents are ignored. When we run: ``` clang++ -std=c++20 -fmodule-output Hello.cppm -c ``` The directory would look like: ``` Hello.cppm Hello.o Hello.pcm Use.cpp ``` And if we run: ``` clang++ -std=c++20 -fmodule-output Hello.cppm -c -o output/Hello.o ``` Then the `output` directory may look like: ``` Hello.o Hello.pcm ``` Reviewed By: dblaikie, iains, tahonermann Differential Revision: https://reviews.llvm.org/D137058
Loading
Please sign in to comment