diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2019-11-27 16:28:15 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2019-11-27 17:16:58 +0300 |
commit | eae1f16d487de3ea2bc2af4323117418ee95c446 (patch) | |
tree | fa2934f362994ad91b8c51bd76ae5c8e7089ce3f | |
parent | 6b7f855f9e8c50be2cddcb3126e25f4986daa46e (diff) | |
download | mrust-eae1f16d487de3ea2bc2af4323117418ee95c446.tar.gz |
Add Solaris targets (amd64)
-rw-r--r-- | src/trans/target.cpp | 7 | ||||
-rw-r--r-- | tools/common/target_detect.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/trans/target.cpp b/src/trans/target.cpp index 0f4c6320..deb39ff2 100644 --- a/src/trans/target.cpp +++ b/src/trans/target.cpp @@ -369,6 +369,13 @@ namespace { return load_spec_from_file(target_name); } + else if(target_name == "x86_64-pc-solaris2.11") + { + return TargetSpec { + "unix", "solaris", "gnu", {CodegenMode::Gnu11, false, "x86_64-pc-solaris2.11", BACKEND_C_OPTS_GNU}, + ARCH_X86_64 + }; + } else if(target_name == "i586-linux-gnu") { return TargetSpec { diff --git a/tools/common/target_detect.h b/tools/common/target_detect.h index dda4bc31..ed5f9c00 100644 --- a/tools/common/target_detect.h +++ b/tools/common/target_detect.h @@ -14,6 +14,13 @@ # else # define DEFAULT_TARGET_NAME "x86-pc-windows-msvc" # endif +// Solaris/illumos +#elif defined(__sun__) +# if defined(__amd64__) +# define DEFAULT_TARGET_NAME "x86_64-pc-solaris2.11" +# else +# warning "Unable to detect a suitable default target (solaris)" +# endif // - Linux #elif defined(__linux__) # if defined(__amd64__) |