This commit is contained in:
parent
5b0df7af1a
commit
46f0385f32
2 changed files with 11 additions and 5 deletions
|
|
@ -128,6 +128,7 @@ namespace Crafter {
|
|||
std::cout << "1" << std::endl;
|
||||
|
||||
std::string libcxx = std::getenv("LIBCXX_DIR");
|
||||
libcxx.pop_back();
|
||||
libcxx.pop_back();
|
||||
|
||||
std::cout << "2" << std::endl;
|
||||
|
|
|
|||
|
|
@ -247,15 +247,14 @@ namespace Crafter {
|
|||
|
||||
std::string command = std::format("clang++ -stdlib=libc++ --target={} -march={} -mtune={} -std={} -D CRAFTER_BUILD_CONFIGURATION_TARGET_{} -fprebuilt-module-path={}", config.target, config.march, config.march, config.standard, editedTarget, (exeDir/config.target).string());
|
||||
|
||||
|
||||
for (const auto& entry : fs::directory_iterator(buildDir)) {
|
||||
if (entry.is_directory()) {
|
||||
for (const auto& entry : fs::recursive_directory_iterator(buildDir)) {
|
||||
if (entry.is_directory() && entry.path().filename() == "include") {
|
||||
command += " -I" + entry.path().string() + " ";
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& entry : fs::directory_iterator(exeDir/"cloneCache")) {
|
||||
if (entry.is_directory()) {
|
||||
for (const auto& entry : fs::recursive_directory_iterator(exeDir / "cloneCache")) {
|
||||
if (entry.is_directory() && entry.path().filename() == "include") {
|
||||
command += " -I" + entry.path().string() + " ";
|
||||
}
|
||||
}
|
||||
|
|
@ -344,7 +343,13 @@ namespace Crafter {
|
|||
|
||||
for(const CmakeDep& cmake : config.cmakeDeps) {
|
||||
depThreads.emplace_back([&cmake, &cmakeBuildType, &buildDir](){
|
||||
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
|
||||
system(std::format("cd {} && cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=\"-stdlib=libc++\" -DCMAKE_EXE_LINKER_FLAGS=\"-stdlib=libc++\" -DCMAKE_SHARED_LINKER_FLAGS=\"-stdlib=libc++\" -DCMAKE_BUILD_TYPE={} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY={} {} && cmake --build build --config {}", cmake.path.string(), cmakeBuildType, buildDir.string(), buildDir.string(), cmake.options, cmakeBuildType).c_str());
|
||||
#endif
|
||||
|
||||
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
|
||||
system(std::format("cd {} && cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS="-nostdinc++ -nostdlib++ -isystem %LIBCXX_DIR%\include\c++\v1" -DCMAKE_EXE_LINKER_FLAGS="-nostdinc++ -nostdlib++ -L %LIBCXX_DIR%\lib -lc++" -DCMAKE_SHARED_LINKER_FLAGS="-nostdinc++ -nostdlib++ -L %LIBCXX_DIR%\lib -lc++" -DCMAKE_BUILD_TYPE={} -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY={} -DCMAKE_LIBRARY_OUTPUT_DIRECTORY={} {} && cmake --build build --config {}", cmake.path.string(), cmakeBuildType, buildDir.string(), buildDir.string(), cmake.options, cmakeBuildType).c_str());
|
||||
#endif
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue