module root define fix
This commit is contained in:
parent
42756cf75e
commit
30766cbb62
1 changed files with 8 additions and 2 deletions
|
|
@ -163,6 +163,12 @@ void Module::Check() {
|
|||
}
|
||||
|
||||
void Module::Compile(std::string clangDir, const Configuration& config, fs::path pcmDir, std::string target, const std::string& march, const std::string& flags, const fs::path& buildDir) {
|
||||
|
||||
std::string defines;
|
||||
for(const Define& define : config.defines) {
|
||||
defines+=define.ToString();
|
||||
}
|
||||
|
||||
std::vector<std::thread> threads;
|
||||
for(auto& [key, val] : partitions) {;
|
||||
if(val.needsRecompiling) {
|
||||
|
|
@ -177,7 +183,7 @@ void Module::Compile(std::string clangDir, const Configuration& config, fs::path
|
|||
}
|
||||
|
||||
{
|
||||
std::string command = std::format("{} {} -std={} {}.cppm --precompile {} -fprebuilt-module-path={} -o {}.pcm {}", clangDir, flags, config.standard, path.generic_string(), march, pcmDir.generic_string(), (pcmDir/path.filename()).generic_string(), target);
|
||||
std::string command = std::format("{} {} {} -std={} {}.cppm --precompile {} -fprebuilt-module-path={} -o {}.pcm {}", clangDir, defines, flags, config.standard, path.generic_string(), march, pcmDir.generic_string(), (pcmDir/path.filename()).generic_string(), target);
|
||||
if(config.verbose) {
|
||||
std::cout << command << std::endl;
|
||||
}
|
||||
|
|
@ -193,7 +199,7 @@ void Module::Compile(std::string clangDir, const Configuration& config, fs::path
|
|||
}
|
||||
}
|
||||
threads2.emplace_back([this, &clangDir, &config, &pcmDir, &target, &march, &flags, &buildDir](){
|
||||
std::string command = std::format("{} -std={} {}.pcm -fprebuilt-module-path={} -c -O{} {} {} -o {}.o {}", clangDir, config.standard, (pcmDir/path.filename()).generic_string(), pcmDir.generic_string(), config.optimizationLevel, march, flags, (buildDir/path.filename()).generic_string(), target);
|
||||
std::string command = std::format("{} {} -std={} {}.pcm -fprebuilt-module-path={} -c -O{} {} {} -o {}.o {}", clangDir, defines, config.standard, (pcmDir/path.filename()).generic_string(), pcmDir.generic_string(), config.optimizationLevel, march, flags, (buildDir/path.filename()).generic_string(), target);
|
||||
if(config.verbose) {
|
||||
std::cout << command << std::endl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue