This commit is contained in:
parent
3823d4360f
commit
58c43f2942
2 changed files with 4 additions and 11 deletions
|
|
@ -121,27 +121,18 @@ namespace Crafter {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildMsvcStdPcm(const Project& project, const Configuration& config) {
|
void BuildMsvcStdPcm(const Project& project, const Configuration& config) {
|
||||||
std::cout << "0" << std::endl;
|
|
||||||
fs::path exeDir = GetPath();
|
fs::path exeDir = GetPath();
|
||||||
fs::create_directories(exeDir/config.target);
|
fs::create_directories(exeDir/config.target);
|
||||||
|
|
||||||
std::cout << "1" << std::endl;
|
|
||||||
|
|
||||||
std::string libcxx = std::getenv("LIBCXX_DIR");
|
std::string libcxx = std::getenv("LIBCXX_DIR");
|
||||||
|
|
||||||
std::cout << "2" << std::endl;
|
|
||||||
|
|
||||||
std::string stdPcm = std::format("{}\\{}\\std.pcm", exeDir.string(), config.target);
|
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::string stdcppm = std::format("{}\\modules\\c++\\v1\\std.cppm", libcxx);
|
||||||
std::cout << stdcppm << std::endl;
|
|
||||||
|
|
||||||
if(!fs::exists(stdPcm) || fs::last_write_time(stdPcm) < fs::last_write_time(stdcppm)) {
|
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::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 != "") {
|
if(result != "") {
|
||||||
std::cout << result << std::endl;
|
std::cout << result << std::endl;
|
||||||
throw std::runtime_error(result);
|
throw std::runtime_error(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -475,7 +475,9 @@ namespace Crafter {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
|
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
|
||||||
system("copy %LIBCXX_DIR%\\lib\\c++.dll .\\bin\\executable-windows-msvc\\c++.dll");//
|
system("echo %LIBCXX_DIR%\\lib\\c++.dll");
|
||||||
|
system("echo .\\bin\\executable-windows-msvc\\c++.dll");
|
||||||
|
system("copy %LIBCXX_DIR%\\lib\\c++.dll .\\bin\\executable-windows-msvc\\c++.dll");
|
||||||
buildResult.errors = RunClang(std::format("{}{} -o {} -fuse-ld=lld -L %LIBCXX_DIR%\\lib -lc++ -nostdinc++ -nostdlib++", command, files, (binDir/outputName).string()));
|
buildResult.errors = RunClang(std::format("{}{} -o {} -fuse-ld=lld -L %LIBCXX_DIR%\\lib -lc++ -nostdinc++ -nostdlib++", command, files, (binDir/outputName).string()));
|
||||||
#endif
|
#endif
|
||||||
} else if(config.type == CRAFTER_CONFIGURATION_TYPE_LIBRARY) {
|
} else if(config.type == CRAFTER_CONFIGURATION_TYPE_LIBRARY) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue