parent
918ce748a4
commit
9bd12660eb
8 changed files with 94 additions and 60 deletions
|
|
@ -211,12 +211,8 @@ namespace Crafter {
|
|||
fs::create_directories(exeDir/config.target);
|
||||
const std::string stdPcm = std::format("{}/{}/std.pcm", exeDir.string(), config.target);
|
||||
|
||||
std::string gccVersion = RunCommand("g++ -dumpversion");
|
||||
gccVersion.pop_back();
|
||||
fs::path stdCc = fs::path(std::format("/usr/include/c++/{}/bits/std.cc", gccVersion));
|
||||
|
||||
if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time(stdCc)) {
|
||||
std::string result = RunCommand(std::format("cp {} {}/{}/std.cppm\nclang++ --target={} -std=c++26 -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile {}/{}/std.cppm -o {}", stdCc.string(), exeDir.string(), config.target, config.target, exeDir.string(), config.target, stdPcm));
|
||||
if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time("/usr/share/libc++/v1/std.cppm")) {
|
||||
std::string result = RunCommand(std::format("clang++ --target={} -std=c++26 -stdlib=libc++ -march=native -mtune=native -O3 -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile /usr/share/libc++/v1/std.cppm -o {}", config.target, stdPcm));
|
||||
if(result != "") {
|
||||
throw std::runtime_error(result);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue