瀏覽代碼

Respect base_warning_flags

default_compile_flags
vector-of-bool 4 年之前
父節點
當前提交
af054a6c64
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. +8
    -2
      src/dds/toolchain/from_json.cpp

+ 8
- 2
src/dds/toolchain/from_json.cpp 查看文件

@@ -573,8 +573,9 @@ toolchain dds::parse_toolchain_json_data(const json5::data& dat, std::string_vie
#endif
});

/// TODO: Handle base_warning_flags:
tc.warning_flags = read_opt(warning_flags, [&]() -> string_seq {
// `base_warning_flags` is loaded first, and switches based on compiler_id.
// This one is "advanced," and sets a common base for warning sets
tc.warning_flags = read_opt(base_warning_flags, [&]() -> string_seq {
if (!compiler_id) {
// No error. Just no warning flags
return {};
@@ -588,6 +589,11 @@ toolchain dds::parse_toolchain_json_data(const json5::data& dat, std::string_vie
std::terminate();
});

// `warning_flags` allows the user to provide additional warnings/errors
if (warning_flags) {
extend(tc.warning_flags, *warning_flags);
}

tc.link_archive = read_opt(create_archive, [&]() -> string_seq {
if (!compiler_id) {
fail(context, "Unable to deduce archive creation rules without a 'compiler_id'");

Loading…
取消
儲存