This commit is contained in:
parent
e3b57e1786
commit
73883b5807
1 changed files with 10 additions and 0 deletions
|
|
@ -121,21 +121,31 @@ namespace Crafter {
|
|||
}
|
||||
|
||||
void BuildMsvcStdPcm(const Project& project, const Configuration& config) {
|
||||
std::cout << "0" << std::endl;
|
||||
fs::path exeDir = GetPath();
|
||||
fs::create_directories(exeDir/config.target);
|
||||
|
||||
std::cout << "1" << std::endl;
|
||||
|
||||
const char* libcxx = std::getenv("LIBCXX_DIR");
|
||||
if (!libcxx) {
|
||||
std::cout << "LIBCXX_DIR environment variable not set" << std::endl;
|
||||
throw std::runtime_error("LIBCXX_DIR environment variable not set");
|
||||
}
|
||||
|
||||
std::cout << "2" << std::endl;
|
||||
|
||||
std::string stdPcm = std::format("{}\\{}\\std.pcm", exeDir.string(), config.target);
|
||||
std::cout << "3" << std::endl;
|
||||
std::string stdcppm = std::format("{}\\modules\\c++\v1\\std.cppm", libcxx);
|
||||
std::cout << "4" << std::endl;
|
||||
|
||||
if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time(stdcppm)) {
|
||||
std::cout << "5" << std::endl;
|
||||
std::string result = RunCommand(std::format("clang++ --target={} -march=native -mtune=native -isystem %LIBCXX_DIR%\\include\\c++\\v1 -nostdinc++ -nostdlib++ -std=c++26 -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile %LIBCXX_DIR%\\modules\\c++\v1\\std.cppm -o {}", config.target, stdPcm));
|
||||
std::cout << "6" << std::endl;
|
||||
if(result != "") {
|
||||
std::cout << result << std::endl;
|
||||
throw std::runtime_error(result);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue