zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 65ee7909b90fc593ffd1f89777ff019e824eafc9 (tree)
parent 55d235dc389635f16f4c38f70ad685677d04e6e5
Author: LemonBoy <thatlemon@gmail.com>
Date:   Thu,  6 May 2021 19:01:46 +0200

stage2: Pass -mthumb when compiling C/C++ code

Apparently the Clang driver requires this flag and ignores the target
triple.

Diffstat:
Msrc/Compilation.zig | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/Compilation.zig b/src/Compilation.zig @@ -2608,6 +2608,10 @@ pub fn addCCArgs( } } + if (target.cpu.arch.isThumb()) { + try argv.append("-mthumb"); + } + if (comp.haveFramePointer()) { try argv.append("-fno-omit-frame-pointer"); } else {