authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-02-19 08:39:36-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-02-19 08:39:36-05:00
logc9fb5240d6305bcef7db5e12b7676ba3d741c11e
tree486d3b17a280b14fa2e8f4dd6c76a99857380005
parent007a260cda93004c93ef1c6f2e6155cb043188b6
signaturelock-open Commit is signed but in an unrecognized format.

remove --no-rosegment workaround now that valgrind bug is fixed

See #896 Zig 0.3.0+ and Valgrind 3.14+ do not need the workaround.

7 files changed, 0 insertions(+), 37 deletions(-)

build.zig-4
......@@ -49,7 +49,6 @@ pub fn build(b: *Builder) !void {
4949 .c_header_files = nextValue(&index, build_info),
5050 .dia_guids_lib = nextValue(&index, build_info),
5151 .llvm = undefined,
52 .no_rosegment = b.option(bool, "no-rosegment", "Workaround to enable valgrind builds") orelse false,
5352 };
5453 ctx.llvm = try findLLVM(b, ctx.llvm_config_exe);
5554
......@@ -289,8 +288,6 @@ fn nextValue(index: *usize, build_info: []const u8) []const u8 {
289288}
290289
291290fn configureStage2(b: *Builder, exe: var, ctx: Context) !void {
292 exe.setNoRoSegment(ctx.no_rosegment);
293
294291 exe.addIncludeDir("src");
295292 exe.addIncludeDir(ctx.cmake_binary_dir);
296293 addCppLib(b, exe, ctx.cmake_binary_dir, "zig_cpp");
......@@ -375,5 +372,4 @@ const Context = struct {
375372 c_header_files: []const u8,
376373 dia_guids_lib: []const u8,
377374 llvm: LibraryDep,
378 no_rosegment: bool,
379375};
src-self-hosted/link.zig-4
......@@ -145,10 +145,6 @@ fn constructLinkerArgsElf(ctx: *Context) !void {
145145 // lj->args.append("-T");
146146 // lj->args.append(g->linker_script);
147147 //}
148
149 //if (g->no_rosegment_workaround) {
150 // lj->args.append("--no-rosegment");
151 //}
152148 try ctx.args.append(c"--gc-sections");
153149
154150 //lj->args.append("-m");
src/all_types.hpp-1
......@@ -1819,7 +1819,6 @@ struct CodeGen {
18191819 bool is_single_threaded;
18201820 bool is_native_target;
18211821 bool linker_rdynamic;
1822 bool no_rosegment_workaround;
18231822 bool each_lib_rpath;
18241823 bool disable_pic;
18251824
src/codegen.cpp-1
......@@ -8487,7 +8487,6 @@ static Error check_cache(CodeGen *g, Buf *manifest_dir, Buf *digest) {
84878487 cache_bool(ch, g->is_single_threaded);
84888488 cache_bool(ch, g->is_native_target);
84898489 cache_bool(ch, g->linker_rdynamic);
8490 cache_bool(ch, g->no_rosegment_workaround);
84918490 cache_bool(ch, g->each_lib_rpath);
84928491 cache_bool(ch, g->disable_pic);
84938492 cache_buf_opt(ch, g->mmacosx_version_min);
src/link.cpp-3
......@@ -231,9 +231,6 @@ static void construct_linker_job_elf(LinkJob *lj) {
231231 lj->args.append(g->linker_script);
232232 }
233233
234 if (g->no_rosegment_workaround) {
235 lj->args.append("--no-rosegment");
236 }
237234 lj->args.append("--gc-sections");
238235
239236 lj->args.append("-m");
src/main.cpp-5
......@@ -92,7 +92,6 @@ static int print_full_usage(const char *arg0, FILE *file, int return_code) {
9292 " -L[dir] alias for --library-path\n"
9393 " -rdynamic add all symbols to the dynamic symbol table\n"
9494 " -rpath [path] add directory to the runtime library search path\n"
95 " --no-rosegment compromise security to workaround valgrind bug\n"
9695 " --subsystem [subsystem] (windows) /SUBSYSTEM:<subsystem> to the linker\n"
9796 " -framework [name] (darwin) link against framework\n"
9897 " -mios-version-min [ver] (darwin) set iOS deployment target\n"
......@@ -393,7 +392,6 @@ int main(int argc, char **argv) {
393392 BuildMode build_mode = BuildModeDebug;
394393 ZigList<const char *> test_exec_args = {0};
395394 int runtime_args_start = -1;
396 bool no_rosegment_workaround = false;
397395 bool system_linker_hack = false;
398396 TargetSubsystem subsystem = TargetSubsystemAuto;
399397 bool is_single_threaded = false;
......@@ -573,8 +571,6 @@ int main(int argc, char **argv) {
573571 verbose_cimport = true;
574572 } else if (strcmp(arg, "-rdynamic") == 0) {
575573 rdynamic = true;
576 } else if (strcmp(arg, "--no-rosegment") == 0) {
577 no_rosegment_workaround = true;
578574 } else if (strcmp(arg, "--each-lib-rpath") == 0) {
579575 each_lib_rpath = true;
580576 } else if (strcmp(arg, "-ftime-report") == 0) {
......@@ -977,7 +973,6 @@ int main(int argc, char **argv) {
977973 }
978974
979975 codegen_set_rdynamic(g, rdynamic);
980 g->no_rosegment_workaround = no_rosegment_workaround;
981976 if (mmacosx_version_min && mios_version_min) {
982977 fprintf(stderr, "-mmacosx-version-min and -mios-version-min options not allowed together\n");
983978 return EXIT_FAILURE;
std/build.zig-19
......@@ -851,7 +851,6 @@ pub const LibExeObjStep = struct {
851851 disable_libc: bool,
852852 frameworks: BufSet,
853853 verbose_link: bool,
854 no_rosegment: bool,
855854 c_std: Builder.CStd,
856855
857856 // zig only stuff
......@@ -924,7 +923,6 @@ pub const LibExeObjStep = struct {
924923
925924 fn initExtraArgs(builder: *Builder, name: []const u8, root_src: ?[]const u8, kind: Kind, static: bool, ver: Version) LibExeObjStep {
926925 var self = LibExeObjStep{
927 .no_rosegment = false,
928926 .strip = false,
929927 .builder = builder,
930928 .verbose_link = false,
......@@ -967,7 +965,6 @@ pub const LibExeObjStep = struct {
967965
968966 fn initC(builder: *Builder, name: []const u8, kind: Kind, version: Version, static: bool) LibExeObjStep {
969967 var self = LibExeObjStep{
970 .no_rosegment = false,
971968 .builder = builder,
972969 .name = name,
973970 .kind = kind,
......@@ -1009,10 +1006,6 @@ pub const LibExeObjStep = struct {
10091006 return self;
10101007 }
10111008
1012 pub fn setNoRoSegment(self: *LibExeObjStep, value: bool) void {
1013 self.no_rosegment = value;
1014 }
1015
10161009 fn computeOutFileNames(self: *LibExeObjStep) void {
10171010 switch (self.kind) {
10181011 Kind.Obj => {
......@@ -1382,9 +1375,6 @@ pub const LibExeObjStep = struct {
13821375 }
13831376 }
13841377
1385 if (self.no_rosegment) {
1386 try zig_args.append("--no-rosegment");
1387 }
13881378 if (self.system_linker_hack) {
13891379 try zig_args.append("--system-linker-hack");
13901380 }
......@@ -1704,7 +1694,6 @@ pub const TestStep = struct {
17041694 lib_paths: ArrayList([]const u8),
17051695 packages: ArrayList(Pkg),
17061696 object_files: ArrayList([]const u8),
1707 no_rosegment: bool,
17081697 output_path: ?[]const u8,
17091698 system_linker_hack: bool,
17101699 override_std_dir: ?[]const u8,
......@@ -1726,17 +1715,12 @@ pub const TestStep = struct {
17261715 .lib_paths = ArrayList([]const u8).init(builder.allocator),
17271716 .packages = ArrayList(Pkg).init(builder.allocator),
17281717 .object_files = ArrayList([]const u8).init(builder.allocator),
1729 .no_rosegment = false,
17301718 .output_path = null,
17311719 .system_linker_hack = false,
17321720 .override_std_dir = null,
17331721 };
17341722 }
17351723
1736 pub fn setNoRoSegment(self: *TestStep, value: bool) void {
1737 self.no_rosegment = value;
1738 }
1739
17401724 pub fn addLibPath(self: *TestStep, path: []const u8) void {
17411725 self.lib_paths.append(path) catch unreachable;
17421726 }
......@@ -1938,9 +1922,6 @@ pub const TestStep = struct {
19381922 zig_args.append("--pkg-end") catch unreachable;
19391923 }
19401924
1941 if (self.no_rosegment) {
1942 try zig_args.append("--no-rosegment");
1943 }
19441925 if (self.system_linker_hack) {
19451926 try zig_args.append("--system-linker-hack");
19461927 }