Skip to content

Commit

Permalink
Hack so batch mode C++ compilation works.
Browse files Browse the repository at this point in the history
  • Loading branch information
skaller committed Aug 30, 2022
1 parent cc8105f commit afc5218
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/packages/flx.fdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3037,6 +3037,7 @@ class Flx
var pass = 0;
var fail = 0;
files = sort files;
var save_extra_cxx = control*.cpps;
for file in files do
var arg = Filename::join (control*.INDIR, file);
var path,ext = Filename::split_extension(arg);
Expand All @@ -3047,6 +3048,11 @@ class Flx
loopctl.base <- base;
// temporary hack, to force reset of the linker filename, stdout, and expect
// file names in cal_depvars so they depend on the current file.
control.cpps <- save_extra_cxx; // because in C++ batch mode there's no main so we have to tack it on here
if control*.CXXONLY == 1 do
control.cpps <- control*.cpps + file;
println$ "[flx] --c++ set cpps = " + control*.cpps._strr;
done
control.LINKER_OUTPUT_FILENAME <- "";
control.STDOUT <- "";
control.EXPECT <- "";
Expand Down Expand Up @@ -3248,6 +3254,11 @@ class BootFlx
control.LINKER_OUTPUT_FILENAME <- "";
control.STDOUT <- "";
control.EXPECT <- "";
control.cpps <- save_extra_cxx; // because in C++ batch mode there's no main so we have to tack it on here
if control*.CXXONLY == 1 do
control.cpps <- control*.cpps + file;
//`println$ "[flx] --c++ set cpps = " + control*.cpps._strr;
done
var dvars = FlxDepvars::cal_depvars(toolchain_maker,c_compiler_executable, cxx_compiler_executable, *config,control,*loopctl);
if control*.FANCYLOG == 1 do
print$ f"Processing [%02d/%02d]: %S\r" (i, n, (file+" "*40).(0..40));
Expand Down

0 comments on commit afc5218

Please sign in to comment.