summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJohn Hodge (Mutabah) <acessdev@gmail.com>2018-02-21 20:14:43 +0800
committerGitHub <noreply@github.com>2018-02-21 20:14:43 +0800
commit350769c002b51c7fcb7e2d632222fbae3e7a8ab5 (patch)
treefe47ec09ce838c1744397745fba8106b8a1c427e /src/main.cpp
parentaec2d67316fae536e68062d7a5ba4e0145b7d587 (diff)
parenta30e54931004c5ad41a8a7b7233c31b40063c17b (diff)
downloadmrust-350769c002b51c7fcb7e2d632222fbae3e7a8ab5.tar.gz
Merge pull request #58 from ibara/master
Add OpenBSD support.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5063a44b..479bbc14 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -52,6 +52,18 @@
# else
# define DEFAULT_TARGET_NAME "i586-windows-gnu"
# endif
+#elif defined(__OpenBSD__)
+# if defined(__amd64__)
+# define DEFAULT_TARGET_NAME "x86_64-unknown-openbsd"
+# elif defined(__aarch64__)
+# define DEFAULT_TARGET_NAME "arm64-unknown-openbsd"
+# elif defined(__arm__)
+# define DEFAULT_TARGET_NAME "arm-unknown-openbsd"
+# elif defined(__i386__)
+# define DEFAULT_TARGET_NAME "i686-unknown-openbsd"
+# else
+# error "Unable to detect a suitable default target (OpenBSD)"
+# endif
#else
# error "Unable to detect a suitable default target"
#endif