From 385178a1ecb41a7a529d219d80e2ed1232831abd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 21 May 2025 15:39:09 +0200 Subject: feat(cxxdrv): Compile directly when file extension matches. Signed-off-by: Amlal El Mahrouss --- dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'dev/LibCompiler') diff --git a/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc b/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc index 293d97e..29cdee7 100644 --- a/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc +++ b/dev/LibCompiler/src/CPlusPlusCompilerAMD64.cc @@ -884,7 +884,10 @@ LIBCOMPILER_MODULE(CompilerCPlusPlusAMD64) { for (std::string ext : exts) { if (argv_i.find(ext) != std::string::npos) { found = true; - break; + + if (kFactory.Compile(argv_i, kMachine) != kExitOK) { + return kExitNO; + } } } @@ -895,10 +898,6 @@ LIBCOMPILER_MODULE(CompilerCPlusPlusAMD64) { return kExitNO; } - - if (kFactory.Compile(argv_i, kMachine) != kExitOK) { - return kExitNO; - } } kFactory.Unmount(); -- cgit v1.2.3