mirror of https://gitlab.com/nakst/essence
move toolchain get before argc
This commit is contained in:
parent
973d4a5da7
commit
fe743fa478
32
util/build.c
32
util/build.c
|
@ -1947,22 +1947,6 @@ int main(int _argc, char **_argv) {
|
|||
|
||||
SaveConfig();
|
||||
|
||||
if (argc >= 2) {
|
||||
char buffer[4096];
|
||||
buffer[0] = 0;
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (strlen(argv[i]) + 1 > sizeof(buffer) - strlen(buffer)) break;
|
||||
if (i > 1) strcat(buffer, " ");
|
||||
strcat(buffer, argv[i]);
|
||||
}
|
||||
|
||||
DoCommand(buffer);
|
||||
return 0;
|
||||
} else {
|
||||
interactiveMode = true;
|
||||
}
|
||||
|
||||
const char *runFirstCommand = NULL;
|
||||
|
||||
if (CallSystem("" TOOLCHAIN_PREFIX "-gcc --version > /dev/null 2>&1 ")) {
|
||||
|
@ -1979,6 +1963,22 @@ int main(int _argc, char **_argv) {
|
|||
foundValidCrossCompiler = true;
|
||||
}
|
||||
|
||||
if (argc >= 2) {
|
||||
char buffer[4096];
|
||||
buffer[0] = 0;
|
||||
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (strlen(argv[i]) + 1 > sizeof(buffer) - strlen(buffer)) break;
|
||||
if (i > 1) strcat(buffer, " ");
|
||||
strcat(buffer, argv[i]);
|
||||
}
|
||||
|
||||
DoCommand(buffer);
|
||||
return 0;
|
||||
} else {
|
||||
interactiveMode = true;
|
||||
}
|
||||
|
||||
SaveConfig();
|
||||
|
||||
if (runFirstCommand) {
|
||||
|
|
Loading…
Reference in New Issue