Commit 65ee7909b9

LemonBoy <thatlemon@gmail.com>
2021-05-06 19:01:46
stage2: Pass -mthumb when compiling C/C++ code
Apparently the Clang driver requires this flag and ignores the target triple.
1 parent 55d235d
Changed files (1)
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 {