move strcascmp on isa to _after_ comparing isa against NULL
This commit is contained in:
8
ispc.cpp
8
ispc.cpp
@@ -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 (isa == NULL) {
|
||||||
// If a CPU was specified explicitly, try to pick the best
|
// If a CPU was specified explicitly, try to pick the best
|
||||||
// possible ISA based on that.
|
// 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);
|
isa, cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcasecmp(isa, "host")) {
|
||||||
|
isa = lGetSystemISA();
|
||||||
|
}
|
||||||
|
|
||||||
if (arch == NULL) {
|
if (arch == NULL) {
|
||||||
#ifdef ISPC_ARM_ENABLED
|
#ifdef ISPC_ARM_ENABLED
|
||||||
if (!strncmp(isa, "neon", 4))
|
if (!strncmp(isa, "neon", 4))
|
||||||
|
|||||||
Reference in New Issue
Block a user