diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-02-20 22:35:24 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 95fa2a46519d0820548ab7855b32182ff81f0435 (patch) | |
tree | ff5333b61195a0d5019eb3d0aea05a1ff1ba7897 /src/main.cpp | |
parent | 29fa87b048c20a1e6e648cb874c6da1cb7f1766a (diff) |
Change linux platform from 64 to x86_64, add sibs platforms command
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index c954634..bf97450 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -127,6 +127,7 @@ static void usage() printf(" test\t\tBuild and run tests for a sibs project\n"); printf(" package\t\tCreate a redistributable package from a sibs project. Note: Redistributable packages can't use system packages to build\n"); printf(" platform\t\tPrint name of platform (to stdout) and exit\n"); + printf(" platforms\t\tPrint list of supported platforms (to stdout) and exit\n"); exit(1); } @@ -138,7 +139,7 @@ static void usageBuild() printf(" project_path\t\tThe directory containing a project.conf file - Optional (default: current directory)\n"); printf(" --debug|--release\t\tOptimization level to build project and dependencies with (if not a system package) - Optional (default: --debug)\n"); printf(" --sanitize\t\tAdd runtime address/undefined behavior sanitization. Program can be up to 3 times slower and use 10 times as much RAM. Ignored if compiler doesn't support sanitization - Optional (default: disabled)\n"); - printf(" --platform\t\tThe platform to build for - Optional (default: the running platform). Platform can be either linux32, linux64, win32 or win64\n"); + printf(" --platform\t\tThe platform to build for - Optional (default: the running platform)\n"); printf("Examples:\n"); printf(" sibs build\n"); printf(" sibs build dirA/dirB\n"); @@ -522,13 +523,14 @@ static int buildProject(int argc, const _tinydir_char_t **argv) if(platform == PLATFORM_INVALID) { ferr << "Invalid platform " << platformName << endl; + ferr << "Expected one of: " << getPlatformListFormatted() << std::endl; usageBuild(); } - bool crossCompileLinux64ToWin64 = (SYSTEM_PLATFORM == PLATFORM_LINUX64 && platform == PLATFORM_WIN64); + bool crossCompileLinux64ToWin64 = (SYSTEM_PLATFORM == PLATFORM_LINUX_X86_64 && platform == PLATFORM_WIN64); if(platform != SYSTEM_PLATFORM && !crossCompileLinux64ToWin64) { - ferr << "Cross compilation is currently only supported from linux64 to win64" << endl; + ferr << "Cross compilation is currently only supported from linux_X86_64 to win64" << endl; exit(33); } @@ -1434,6 +1436,11 @@ int wmain(int argc, const _tinydir_char_t **argv) printf("%s\n", asString(SYSTEM_PLATFORM)); return 0; } + else if(_tinydir_strcmp(arg, TINYDIR_STRING("platforms")) == 0) + { + printf("%s\n", getPlatformListFormatted().c_str()); + return 0; + } else { ferr << "Expected command to be either 'build', 'new' or 'test', was: " << arg << endl << endl; |