aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-03-30 17:42:30 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-03-30 17:42:30 -0400
commitcfedd3aca286881510e4a298756d4a5676e22137 (patch)
tree48d4fcf40d69b7fcd4773c934110a83bbd710d71 /src/main.cpp
parent6408766d6b55d228a305b877f28f45c1587f7d39 (diff)
downloadzig-cfedd3aca286881510e4a298756d4a5676e22137.tar.gz
zig-cfedd3aca286881510e4a298756d4a5676e22137.zip
revert detection of rtti and exceptions
This caused link errors in c++ code because it was not correct to pass these flags to child codegens. And that was the only reason to detect these flags. Otherwise we can safely rely on non-explicitly-detected flag forwarding.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 05ba1ab40f..c95a512210 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -458,8 +458,6 @@ static int main0(int argc, char **argv) {
bool only_preprocess = false;
bool ensure_libc_on_non_freestanding = false;
bool ensure_libcpp_on_non_freestanding = false;
- bool cpp_rtti = true;
- bool cpp_exceptions = true;
ZigList<const char *> llvm_argv = {0};
llvm_argv.append("zig (LLVM option parsing)");
@@ -724,18 +722,6 @@ static int main0(int argc, char **argv) {
verbose_cc = true;
verbose_link = true;
break;
- case Stage2ClangArgExceptions:
- cpp_exceptions = true;
- break;
- case Stage2ClangArgNoExceptions:
- cpp_exceptions = false;
- break;
- case Stage2ClangArgRtti:
- cpp_rtti = true;
- break;
- case Stage2ClangArgNoRtti:
- cpp_rtti = false;
- break;
case Stage2ClangArgForLinker:
linker_args.append(buf_create_from_str(it.only_arg));
break;
@@ -1331,8 +1317,6 @@ static int main0(int argc, char **argv) {
LinkLib *link_lib = codegen_add_link_lib(g, buf_create_from_str(link_libs.at(i)));
link_lib->provided_explicitly = true;
}
- g->cpp_rtti = cpp_rtti;
- g->cpp_exceptions = cpp_exceptions;
g->subsystem = subsystem;
g->valgrind_support = valgrind_support;
g->want_pic = want_pic;
@@ -1481,8 +1465,6 @@ static int main0(int argc, char **argv) {
}
CodeGen *g = codegen_create(main_pkg_path, zig_root_source_file, &target, out_type, build_mode,
override_lib_dir, libc, cache_dir_buf, cmd == CmdTest, root_progress_node);
- g->cpp_rtti = cpp_rtti;
- g->cpp_exceptions = cpp_exceptions;
if (llvm_argv.length >= 2) codegen_set_llvm_argv(g, llvm_argv.items + 1, llvm_argv.length - 2);
g->valgrind_support = valgrind_support;
g->link_eh_frame_hdr = link_eh_frame_hdr;