@@ -1,2 +1,3 @@ | |||
target := bbbuild | |||
files := src | |||
warnings := all extra no-unused-parameter |
@@ -79,7 +79,10 @@ bool CompileStep::checkHasChanged(const std::string &outDir) { | |||
} | |||
void CompileStep::doBuild(const std::string &outDir) { | |||
logger::log("Compile " + path_); | |||
bool verboseCommand = global::verbose >= 1; | |||
if (!verboseCommand) { | |||
logger::log("Compile " + path_); | |||
} | |||
std::string objPath = toolchain::objectFilePath(path_, outDir); | |||
std::string dirPath = sys::dirname(objPath); | |||
@@ -96,7 +99,7 @@ void CompileStep::doBuild(const std::string &outDir) { | |||
BBWriter writer(f); | |||
writer.write(newCachedVars); | |||
sys::execute(command, nullptr, global::verbose >= 1); | |||
sys::execute(command, nullptr, verboseCommand); | |||
} | |||
void CompileStep::doWriteCompDB(const std::string &outDir, compdb::Writer &w) { |
@@ -157,9 +157,9 @@ void getFlags(const BBVariables &vars, FileType type, std::vector<std::string> & | |||
} | |||
} | |||
auto sanitize = vars.find("sanitize"); | |||
if (sanitize != vars.end()) { | |||
for (auto &s: sanitize->second) { | |||
auto sanitizers = vars.find("sanitizers"); | |||
if (sanitizers != vars.end()) { | |||
for (auto &s: sanitizers->second) { | |||
flags.push_back("-fsanitize=" + s); | |||
} | |||
} | |||
@@ -200,10 +200,10 @@ void getLDLibs(const BBVariables &vars, std::vector<std::string> &flags) { | |||
} | |||
void getLDFlags(const BBVariables &vars, std::vector<std::string> &flags) { | |||
auto sanitize = vars.find("sanitize"); | |||
auto sanitize = vars.find("sanitizers"); | |||
if (sanitize != vars.end()) { | |||
for (auto &s: sanitize->second) { | |||
flags.push_back("-fsanitize=" + s); | |||
flags.push_back("-fsanitizers=" + s); | |||
} | |||
} | |||