From af390b75dbdb33f6ccf80c14d32ee5b89421c35b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 7 Jan 2020 16:02:38 -0500 Subject: [PATCH] cleanups related to --eh-frame-hdr --- lib/std/build.zig | 12 ++++-------- src/codegen.cpp | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/std/build.zig b/lib/std/build.zig index 6d6045331..ad4be9e4c 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -40,7 +40,6 @@ pub const Builder = struct { verbose_ir: bool, verbose_llvm_ir: bool, verbose_cimport: bool, - link_eh_frame_hdr: bool, invalid_user_input: bool, zig_exe: []const u8, default_step: *Step, @@ -137,7 +136,6 @@ pub const Builder = struct { .verbose_ir = false, .verbose_llvm_ir = false, .verbose_cimport = false, - .link_eh_frame_hdr = false, .invalid_user_input = false, .allocator = allocator, .native_system_lib_paths = ArrayList([]const u8).init(allocator), @@ -1627,10 +1625,6 @@ pub const LibExeObjStep = struct { self.verbose_cc = value; } - pub fn setLinkEhFrameHdr(self: *LibExeObjStep, value: bool) void { - self.link_eh_frame_hdr = value; - } - pub fn setBuildMode(self: *LibExeObjStep, mode: builtin.Mode) void { self.build_mode = mode; } @@ -1916,10 +1910,12 @@ pub const LibExeObjStep = struct { if (builder.verbose_llvm_ir) zig_args.append("--verbose-llvm-ir") catch unreachable; if (builder.verbose_link or self.verbose_link) zig_args.append("--verbose-link") catch unreachable; if (builder.verbose_cc or self.verbose_cc) zig_args.append("--verbose-cc") catch unreachable; - if (builder.link_eh_frame_hdr or self.link_eh_frame_hdr) zig_args.append("--eh-frame-hdr") catch unreachable; if (self.strip) { - zig_args.append("--strip") catch unreachable; + try zig_args.append("--strip"); + } + if (self.link_eh_frame_hdr) { + try zig_args.append("--eh-frame-hdr"); } if (self.single_threaded) { diff --git a/src/codegen.cpp b/src/codegen.cpp index 7cb121812..937ccf1a3 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9511,7 +9511,6 @@ Error create_c_object_cache(CodeGen *g, CacheHash **out_cache_hash, bool verbose cache_int(cache_hash, g->build_mode); cache_bool(cache_hash, g->have_pic); cache_bool(cache_hash, g->have_sanitize_c); - cache_bool(cache_hash, g->link_eh_frame_hdr); cache_bool(cache_hash, want_valgrind_support(g)); cache_bool(cache_hash, g->function_sections); for (size_t arg_i = 0; arg_i < g->clang_argv_len; arg_i += 1) {