diff options
| author | Lee Cannon <leecannon@leecannon.xyz> | 2021-11-01 17:57:04 +0000 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-11-01 14:14:07 -0400 |
| commit | f951bf8aeb83c9d0e6528f45d2b2975e50be993a (patch) | |
| tree | 15601d6b85d0efae7644232383278b8874822fdc /src/Compilation.zig | |
| parent | 83dcfd62053a80024b1cb282fddf399a36c9c58e (diff) | |
| download | zig-f951bf8aeb83c9d0e6528f45d2b2975e50be993a.tar.gz zig-f951bf8aeb83c9d0e6528f45d2b2975e50be993a.zip | |
correct bug with omit frame pointer logic
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 48d422fad2..385a98401a 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -3386,12 +3386,6 @@ pub fn addCCArgs( try argv.append("-mthumb"); } - if (comp.haveFramePointer()) { - try argv.append("-fno-omit-frame-pointer"); - } else { - try argv.append("-fomit-frame-pointer"); - } - if (comp.sanitize_c and !comp.bin_file.options.tsan) { try argv.append("-fsanitize=undefined"); try argv.append("-fsanitize-trap=undefined"); @@ -3711,16 +3705,6 @@ test "classifyFileExt" { try std.testing.expectEqual(FileExt.zig, classifyFileExt("foo.zig")); } -fn haveFramePointer(comp: *const Compilation) bool { - // If you complicate this logic make sure you update the parent cache hash. - // Right now it's not in the cache hash because the value depends on optimize_mode - // and strip which are both already part of the hash. - return switch (comp.bin_file.options.optimize_mode) { - .Debug, .ReleaseSafe => !comp.bin_file.options.strip, - .ReleaseSmall, .ReleaseFast => false, - }; -} - const LibCDirs = struct { libc_include_dir_list: []const []const u8, libc_installation: ?*const LibCInstallation, |
