aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-06-04 11:12:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-06-04 11:12:17 +0200
commit7e29381f48967c0f9588bb749cd3702b170c3709 (patch)
tree1bcc7da99b7e7ac3ab9c785ce45130b7001ab485
parent2050633f163eb60a073aa59af60fb9eb6f0e236d (diff)
Adjust Clang language selection
-rw-r--r--build2/cc/compile.cxx31
1 files changed, 9 insertions, 22 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index d5566b8..b301709 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -75,7 +75,7 @@ namespace build2
langopt (const match_data& md) const
{
bool m (md.mod);
- preprocessed p (md.pp);
+ //preprocessed p (md.pp);
switch (cid)
{
@@ -92,28 +92,15 @@ namespace build2
}
case compiler_id::clang:
{
- switch (p)
+ // Clang has *-cpp-output (but not c++-module-cpp-output) and they
+ // handle comments and line continuations. However, currently this
+ // is only by accident since these modes are essentially equivalent
+ // to their cpp-output-less versions.
+ //
+ switch (x_lang)
{
- case preprocessed::none:
- case preprocessed::includes:
- case preprocessed::modules:
- {
- switch (x_lang)
- {
- case lang::c: return "c";
- case lang::cxx: return m ? "c++-module" : "c++";
- }
- }
- case preprocessed::all:
- {
- switch (x_lang)
- {
- case lang::c: return "cpp-output";
- case lang::cxx: return (m
- ? "c++-module-cpp-output"
- : "c++-cpp-output");
- }
- }
+ case lang::c: return "c";
+ case lang::cxx: return m ? "c++-module" : "c++";
}
}
case compiler_id::msvc: