Make --ccompiler tcc work

This commit is contained in:
luboslenco
2025-06-16 10:23:16 +02:00
parent 6fd432927f
commit 9ea7a6960e
+8
View File
@@ -1885,6 +1885,14 @@ class LinuxExporter extends Exporter {
compilerFlags += "-flto";
linkerFlags += " -flto";
}
else if (this.getCCompiler() == "tcc") {
let tccdir = makedir + "/tcc"
linkerFlags = "-lc -lm -pthread";
goptions.ccompiler = tccdir + "/tcc";
goptions.ccompiler += " -DSTBI_NO_SIMD -DSINFL_NO_SIMD";
goptions.ccompiler += " -I" + tccdir + " -I" + tccdir + "/include -B" + tccdir;
goptions.cppcompiler = goptions.ccompiler;
}
this.make = new MakeExporter(this.getCCompiler(), this.getCPPCompiler(), compilerFlags, compilerFlags, linkerFlags, '');
this.compile_commands = new CompilerCommandsExporter();
}