소스 검색

plurals and logging

rebrand
Martin Dørum 5 년 전
부모
커밋
0162e93867
3개의 변경된 파일11개의 추가작업 그리고 7개의 파일을 삭제
  1. 1
    0
      build.bb
  2. 5
    2
      src/CompileStep.cc
  3. 5
    5
      src/toolchain.cc

+ 1
- 0
build.bb 파일 보기

target := bbbuild target := bbbuild
files := src files := src
warnings := all extra no-unused-parameter

+ 5
- 2
src/CompileStep.cc 파일 보기

} }


void CompileStep::doBuild(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 objPath = toolchain::objectFilePath(path_, outDir);
std::string dirPath = sys::dirname(objPath); std::string dirPath = sys::dirname(objPath);
BBWriter writer(f); BBWriter writer(f);
writer.write(newCachedVars); 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) { void CompileStep::doWriteCompDB(const std::string &outDir, compdb::Writer &w) {

+ 5
- 5
src/toolchain.cc 파일 보기

} }
} }


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); flags.push_back("-fsanitize=" + s);
} }
} }
} }


void getLDFlags(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()) { if (sanitize != vars.end()) {
for (auto &s: sanitize->second) { for (auto &s: sanitize->second) {
flags.push_back("-fsanitize=" + s);
flags.push_back("-fsanitizers=" + s);
} }
} }



Loading…
취소
저장