Browse Source

plurals and logging

rebrand
Martin Dørum 3 years ago
parent
commit
0162e93867
3 changed files with 11 additions and 7 deletions
  1. 1
    0
      build.bb
  2. 5
    2
      src/CompileStep.cc
  3. 5
    5
      src/toolchain.cc

+ 1
- 0
build.bb View File

@@ -1,2 +1,3 @@
target := bbbuild
files := src
warnings := all extra no-unused-parameter

+ 5
- 2
src/CompileStep.cc View File

@@ -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) {

+ 5
- 5
src/toolchain.cc View File

@@ -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);
}
}


Loading…
Cancel
Save