@@ -385,10 +385,9 @@ class Commands {
385
385
bool verbose,
386
386
bool dryRun
387
387
) {
388
- auto Cmd = getBase (BinDir, PrecompiledPreamble , verbose, dryRun);
388
+ auto Cmd = getClangXXCommand (BinDir, verbose, dryRun);
389
389
Cmd
390
- .addArg (" -flevitation-build-decl" )
391
- .addArg (" -emit-pch" );
390
+ .addArg (" -cppl-inst-decl" );
392
391
return Cmd;
393
392
}
394
393
@@ -398,10 +397,9 @@ class Commands {
398
397
bool verbose,
399
398
bool dryRun
400
399
) {
401
- auto Cmd = getBase (BinDir, PrecompiledPreamble , verbose, dryRun);
400
+ auto Cmd = getClangXXCommand (BinDir, verbose, dryRun);
402
401
Cmd
403
- .addArg (" -flevitation-build-object" )
404
- .addArg (" -emit-obj" );
402
+ .addArg (" -cppl-compile" );
405
403
return Cmd;
406
404
}
407
405
static CommandInfo getCompileSrc (
@@ -450,6 +448,12 @@ class Commands {
450
448
return *this ;
451
449
}
452
450
451
+ CommandInfo& addKVArgEqIfNotEmpty (StringRef Arg, StringRef Value) {
452
+ if (Value.size ())
453
+ addKVArgEq (Arg, Value);
454
+ return *this ;
455
+ }
456
+
453
457
template <typename ValuesT>
454
458
CommandInfo& addArgs (const ValuesT& Values) {
455
459
for (const auto &Value : Values) {
@@ -636,7 +640,8 @@ class Commands {
636
640
auto ExecutionStatus = CommandInfo::getInstDecl (
637
641
BinDir, PrecompiledPreamble, Verbose, DryRun
638
642
)
639
- .addKVArgsEq (" -levitation-dependency" , Deps)
643
+ .addKVArgEqIfNotEmpty (" -cppl-include-preamble" , PrecompiledPreamble)
644
+ .addKVArgsEq (" -cppl-include-dependency" , Deps)
640
645
.addArgs (ExtraArgs)
641
646
.addArg (InputObject)
642
647
.addKVArgSpace (" -o" , OutDeclASTFile)
@@ -665,7 +670,8 @@ class Commands {
665
670
auto ExecutionStatus = CommandInfo::getInstObj (
666
671
BinDir, PrecompiledPreamble, Verbose, DryRun
667
672
)
668
- .addKVArgsEq (" -levitation-dependency" , Deps)
673
+ .addKVArgEqIfNotEmpty (" -cppl-include-preamble" , PrecompiledPreamble)
674
+ .addKVArgsEq (" -cppl-include-dependency" , Deps)
669
675
.addArgs (ExtraArgs)
670
676
.addArg (InputObject)
671
677
.addKVArgSpace (" -o" , OutObjFile)
@@ -721,7 +727,7 @@ class Commands {
721
727
auto ExecutionStatus = CommandInfo::getCompileSrc (
722
728
BinDir, PrecompiledPreamble, Verbose, DryRun
723
729
)
724
- .addKVArgsEq (" -levitation -dependency" , Deps)
730
+ .addKVArgsEq (" -cppl-include -dependency" , Deps)
725
731
.addArgs (ExtraParseArgs)
726
732
.addArgs (ExtraCodeGenArgs)
727
733
.addArg (InputObject)
0 commit comments