Commit 6cf4470
committed
[clang][Modules] Respect -fno-cxx-modules as a driver flag (llvm#150349)
The mentioned flag is already both a cc1 & driver flag; however, whether
it is respected was tied to either:
1. Whether it was passed as a cc1 option (`Xclang`)
2. or `-fmodules` accompanying it
This poses a consistency problem where `std=c++20` enables the modules
feature, independent of other module settings.
This patch resolves this issue by checking for the presence
unconditionally & passing it down to cc1 when applicable.
(cherry picked from commit 5ebdfe3)1 parent 98a3ca2 commit 6cf4470
2 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3923 | 3923 | | |
3924 | 3924 | | |
3925 | 3925 | | |
3926 | | - | |
3927 | | - | |
| 3926 | + | |
| 3927 | + | |
3928 | 3928 | | |
3929 | 3929 | | |
3930 | 3930 | | |
3931 | 3931 | | |
3932 | 3932 | | |
| 3933 | + | |
| 3934 | + | |
3933 | 3935 | | |
3934 | 3936 | | |
3935 | | - | |
3936 | | - | |
3937 | 3937 | | |
3938 | 3938 | | |
3939 | 3939 | | |
| |||
3942 | 3942 | | |
3943 | 3943 | | |
3944 | 3944 | | |
| 3945 | + | |
| 3946 | + | |
| 3947 | + | |
3945 | 3948 | | |
3946 | 3949 | | |
3947 | 3950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
0 commit comments