[aot] Avoid passing -march=arm to llc when using thumb, it forces arm32 code generati...
authorZoltan Varga <vargaz@gmail.com>
Wed, 1 May 2019 00:47:27 +0000 (20:47 -0400)
committerGitHub <noreply@github.com>
Wed, 1 May 2019 00:47:27 +0000 (20:47 -0400)
Fixes https://github.com/mono/mono/issues/14247.

Commit migrated from https://github.com/mono/mono/commit/e431093f73360b5726e5256fd0de3108ec21b38a

src/mono/mono/mini/aot-compiler.c

index fe5dc7e..424df2a 100644 (file)
@@ -1117,7 +1117,8 @@ arch_init (MonoAotCompile *acfg)
        if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "darwin")) {
                g_string_append (acfg->llc_args, "-mattr=+v6");
        } else {
-               g_string_append (acfg->llc_args, " -march=arm");
+               if (!(acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "thumb")))
+                       g_string_append (acfg->llc_args, " -march=arm");
 
                if (acfg->aot_opts.mtriple && strstr (acfg->aot_opts.mtriple, "ios"))
                        g_string_append (acfg->llc_args, " -mattr=+v7");