diff options
-rw-r--r-- | mono/mini/aot-compiler.c | 9 | ||||
-rw-r--r-- | mono/mini/driver.c | 8 | ||||
-rwxr-xr-x | scripts/ci/run-jenkins.sh | 2 |
3 files changed, 15 insertions, 4 deletions
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index 6ae89d652a1..900252831ea 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -231,6 +231,7 @@ typedef struct MonoAotOptions { gboolean dump_json; gboolean profile_only; gboolean no_opt; + char *clangxx; } MonoAotOptions; typedef enum { @@ -7605,6 +7606,8 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts) opts->deterministic = TRUE; } else if (!strcmp (arg, "no-opt")) { opts->no_opt = TRUE; + } else if (str_begins_with (arg, "clangxx=")) { + opts->clangxx = g_strdup (arg + strlen ("clangxx="));; } else if (str_begins_with (arg, "help") || str_begins_with (arg, "?")) { printf ("Supported options for --aot:\n"); printf (" asmonly\n"); @@ -7649,6 +7652,7 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts) printf (" no-opt\n"); printf (" llvmopts=\n"); printf (" llvmllc=\n"); + printf (" clangxx=\n"); printf (" help/?\n"); exit (0); } else { @@ -9127,7 +9131,7 @@ emit_llvm_file (MonoAotCompile *acfg) if (acfg->aot_opts.llvm_only) { /* Use the stock clang from xcode */ // FIXME: arch - command = g_strdup_printf ("clang++ -fexceptions -march=x86-64 -fpic -msse -msse2 -msse3 -msse4 -O2 -fno-optimize-sibling-calls -Wno-override-module -c -o \"%s\" \"%s.opt.bc\"", acfg->llvm_ofile, acfg->tmpbasename); + command = g_strdup_printf ("%s -fexceptions -march=x86-64 -fpic -msse -msse2 -msse3 -msse4 -O2 -fno-optimize-sibling-calls -Wno-override-module -c -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.clangxx, acfg->llvm_ofile, acfg->tmpbasename); aot_printf (acfg, "Executing clang: %s\n", command); if (execute_system (command) != 0) @@ -11423,7 +11427,7 @@ compile_asm (MonoAotCompile *acfg) wrap_path (g_strdup_printf ("%s." AS_OBJECT_FILE_SUFFIX, acfg->tmpfname)), ld_flags); if (acfg->aot_opts.llvm_only) { - command = g_strdup_printf ("clang++ %s", args); + command = g_strdup_printf ("%s %s", acfg->aot_opts.clangxx, args); } else { command = g_strdup_printf ("\"%sld\" %s", tool_prefix, args); } @@ -12621,6 +12625,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options, #ifdef MONOTOUCH acfg->aot_opts.use_trampolines_page = TRUE; #endif + acfg->aot_opts.clangxx = g_strdup ("clang++"); mono_aot_parse_options (aot_options, &acfg->aot_opts); diff --git a/mono/mini/driver.c b/mono/mini/driver.c index f37c7b0c9c3..7261d0cc3b1 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -2164,7 +2164,13 @@ mono_main (int argc, char* argv[]) } else if (strncmp (argv [i], "--aot=", 6) == 0) { error_if_aot_unsupported (); mono_compile_aot = TRUE; - aot_options = &argv [i][6]; + if (aot_options) { + char *tmp = g_strdup_printf ("%s,%s", aot_options, &argv [i][6]); + g_free (aot_options); + aot_options = tmp; + } else { + aot_options = g_strdup (&argv [i][6]); + } #endif } else if (strncmp (argv [i], "--apply-bindings=", 17) == 0) { extra_bindings_config_file = &argv[i][17]; diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh index 05ad66e0ad0..d954f253b9b 100755 --- a/scripts/ci/run-jenkins.sh +++ b/scripts/ci/run-jenkins.sh @@ -64,7 +64,7 @@ elif [[ ${CI_TAGS} == *'fullaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_ elif [[ ${CI_TAGS} == *'hybridaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=hybridaot"; elif [[ ${CI_TAGS} == *'winaot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=winaot"; elif [[ ${CI_TAGS} == *'aot'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=aot"; -elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=bitcode"; +elif [[ ${CI_TAGS} == *'bitcode'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --with-runtime-preset=bitcode"; export MONO_ENV_OPTIONS="$MONO_ENV_OPTIONS --aot=clangxx=clang++-6.0"; elif [[ ${CI_TAGS} == *'acceptance-tests'* ]]; then EXTRA_CONF_FLAGS="${EXTRA_CONF_FLAGS} --prefix=${MONO_REPO_ROOT}/tmp/mono-acceptance-tests --with-sgen-default-concurrent=yes"; elif [[ ${CI_TAGS} == *'all-profiles'* ]]; then # only enable build of the additional profiles on one config to save time |