| ... | @@ -74,6 +74,7 @@ static int usage(const char *arg0) { | ... | @@ -74,6 +74,7 @@ static int usage(const char *arg0) { |
| 74 | " -L[dir] alias for --library-path\n" | 74 | " -L[dir] alias for --library-path\n" |
| 75 | " -rdynamic add all symbols to the dynamic symbol table\n" | 75 | " -rdynamic add all symbols to the dynamic symbol table\n" |
| 76 | " -rpath [path] add directory to the runtime library search path\n" | 76 | " -rpath [path] add directory to the runtime library search path\n" |
| | 77 | " --no-rosegment compromise security to workaround valgrind bug\n" |
| 77 | " -mconsole (windows) --subsystem console to the linker\n" | 78 | " -mconsole (windows) --subsystem console to the linker\n" |
| 78 | " -mwindows (windows) --subsystem windows to the linker\n" | 79 | " -mwindows (windows) --subsystem windows to the linker\n" |
| 79 | " -framework [name] (darwin) link against framework\n" | 80 | " -framework [name] (darwin) link against framework\n" |
| ... | @@ -324,6 +325,7 @@ int main(int argc, char **argv) { | ... | @@ -324,6 +325,7 @@ int main(int argc, char **argv) { |
| 324 | ZigList<const char *> test_exec_args = {0}; | 325 | ZigList<const char *> test_exec_args = {0}; |
| 325 | int comptime_args_end = 0; | 326 | int comptime_args_end = 0; |
| 326 | int runtime_args_start = argc; | 327 | int runtime_args_start = argc; |
| | 328 | bool no_rosegment_workaround = false; |
| 327 | | 329 | |
| 328 | if (argc >= 2 && strcmp(argv[1], "build") == 0) { | 330 | if (argc >= 2 && strcmp(argv[1], "build") == 0) { |
| 329 | const char *zig_exe_path = arg0; | 331 | const char *zig_exe_path = arg0; |
| ... | @@ -507,6 +509,8 @@ int main(int argc, char **argv) { | ... | @@ -507,6 +509,8 @@ int main(int argc, char **argv) { |
| 507 | mconsole = true; | 509 | mconsole = true; |
| 508 | } else if (strcmp(arg, "-rdynamic") == 0) { | 510 | } else if (strcmp(arg, "-rdynamic") == 0) { |
| 509 | rdynamic = true; | 511 | rdynamic = true; |
| | 512 | } else if (strcmp(arg, "--no-rosegment") == 0) { |
| | 513 | no_rosegment_workaround = true; |
| 510 | } else if (strcmp(arg, "--each-lib-rpath") == 0) { | 514 | } else if (strcmp(arg, "--each-lib-rpath") == 0) { |
| 511 | each_lib_rpath = true; | 515 | each_lib_rpath = true; |
| 512 | } else if (strcmp(arg, "--enable-timing-info") == 0) { | 516 | } else if (strcmp(arg, "--enable-timing-info") == 0) { |
| ... | @@ -844,6 +848,7 @@ int main(int argc, char **argv) { | ... | @@ -844,6 +848,7 @@ int main(int argc, char **argv) { |
| 844 | | 848 | |
| 845 | codegen_set_windows_subsystem(g, mwindows, mconsole); | 849 | codegen_set_windows_subsystem(g, mwindows, mconsole); |
| 846 | codegen_set_rdynamic(g, rdynamic); | 850 | codegen_set_rdynamic(g, rdynamic); |
| | 851 | g->no_rosegment_workaround = no_rosegment_workaround; |
| 847 | if (mmacosx_version_min && mios_version_min) { | 852 | if (mmacosx_version_min && mios_version_min) { |
| 848 | fprintf(stderr, "-mmacosx-version-min and -mios-version-min options not allowed together\n"); | 853 | fprintf(stderr, "-mmacosx-version-min and -mios-version-min options not allowed together\n"); |
| 849 | return EXIT_FAILURE; | 854 | return EXIT_FAILURE; |