Merge pull request #1131 from aristidb/no-isa-crash-reorder

Fix crash when not specifying --target option
This commit is contained in:
Dmitry Babokin
2015-12-08 16:10:18 +03:00

View File

@@ -478,10 +478,6 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo
}
}
if (!strcasecmp(isa, "host")) {
isa = lGetSystemISA();
}
if (isa == NULL) {
// If a CPU was specified explicitly, try to pick the best
// possible ISA based on that.
@@ -551,6 +547,10 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic, boo
isa, cpu);
}
if (!strcasecmp(isa, "host")) {
isa = lGetSystemISA();
}
if (arch == NULL) {
#ifdef ISPC_ARM_ENABLED
if (!strncmp(isa, "neon", 4))