This commit is contained in:
parent
a5e08a0c5b
commit
fe4e552e31
1 changed files with 1 additions and 11 deletions
|
|
@ -151,23 +151,13 @@ namespace Crafter {
|
|||
void AddLibsRecursive(std::string& libsString, std::unordered_set<std::string> depLibSet, Configuration& depConfig) {
|
||||
for(const std::string& lib2 : depConfig.libs) {
|
||||
if (depLibSet.insert(lib2).second) {
|
||||
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
|
||||
libsString += std::format(" -l{}", lib2);
|
||||
#endif
|
||||
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
|
||||
libsString+=std::format(" {}.lib", lib2);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
for(const std::tuple<std::shared_ptr<Project>, Configuration&>& dep2 : depConfig.dependencies) {
|
||||
std::string outputLib = std::get<0>(dep2)->name+std::get<1>(dep2).name;
|
||||
if (depLibSet.insert(outputLib).second) {
|
||||
#ifdef CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu
|
||||
libsString += std::format(" -l{}", outputLib);
|
||||
#endif
|
||||
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
|
||||
libsString+=std::format(" {}.lib", outputLib);
|
||||
#endif
|
||||
}
|
||||
AddLibsRecursive(libsString, depLibSet, std::get<1>(dep2));
|
||||
}
|
||||
|
|
@ -484,7 +474,7 @@ namespace Crafter {
|
|||
#endif
|
||||
|
||||
#if defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_windows_msvc) || defined(CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_w64_mingw32)
|
||||
RunClang(std::format("clang-lib.exe {} /OUT:{}.lib", files, (binDir/fs::path(outputName)).string()));
|
||||
RunClang(std::format("llvm-lib.exe {} /OUT:{}.lib", files, (binDir/fs::path(outputName)).string()));
|
||||
#endif
|
||||
} else {
|
||||
buildResult.errors = RunClang(std::format("{}{} -shared -o {}.so -Wl,-rpath,'$ORIGIN' -fuse-ld=lld", command, files, (binDir/(std::string("lib")+outputName)).string()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue