summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-05 14:00:20 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-05 14:00:20 +0200
commitb8b4ff534dc61e271ccf3a68ec6c87d9eb7da4ad (patch)
treeb253ff09d152c3df304d589e08c6275ff3f16991
parentfa9f8b4eaa174deb5210de61f353a54202768cd5 (diff)
downloadllvm-b8b4ff534dc61e271ccf3a68ec6c87d9eb7da4ad.tar.gz
llvm-b8b4ff534dc61e271ccf3a68ec6c87d9eb7da4ad.tar.bz2
llvm-b8b4ff534dc61e271ccf3a68ec6c87d9eb7da4ad.tar.xz
[Embtk] complete configure time default for -mcpu
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
-rw-r--r--include/llvm/Config/config.h.cmake3
-rw-r--r--include/llvm/Config/llvm-config.h.cmake3
-rw-r--r--include/llvm/Config/llvm-config.h.in3
-rw-r--r--lib/Support/Windows/Host.inc8
4 files changed, 17 insertions, 0 deletions
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake
index 0bc3a7bd56..c6c5dd9b45 100644
--- a/include/llvm/Config/config.h.cmake
+++ b/include/llvm/Config/config.h.cmake
@@ -573,6 +573,9 @@
/* Default float abi to use to all compiler invocations. */
#cmakedefine LLVM_DEFAULT_TARGET_FLOAT "${LLVM_DEFAULT_TARGET_FLOAT}"
+/* Default cpu (-mcpu=cpu) to use to all compiler invocations. */
+#cmakedefine LLVM_DEFAULT_TARGET_MCPU "${LLVM_DEFAULT_TARGET_MCPU}"
+
/* Target triple LLVM will generate code for by default */
#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake
index e1b1237aec..20e67ba0fa 100644
--- a/include/llvm/Config/llvm-config.h.cmake
+++ b/include/llvm/Config/llvm-config.h.cmake
@@ -28,6 +28,9 @@
/* Default float abi to use to all compiler invocations. */
#cmakedefine LLVM_DEFAULT_TARGET_FLOAT "${LLVM_DEFAULT_TARGET_FLOAT}"
+/* Default cpu (-mcpu=cpu) to use to all compiler invocations. */
+#cmakedefine LLVM_DEFAULT_TARGET_MCPU "${LLVM_DEFAULT_TARGET_MCPU}"
+
/* Target triple LLVM will generate code for by default */
#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in
index a8e5b7e5b5..09d54cc521 100644
--- a/include/llvm/Config/llvm-config.h.in
+++ b/include/llvm/Config/llvm-config.h.in
@@ -28,6 +28,9 @@
/* Default float abi to use to all compiler invocations. */
#undef LLVM_DEFAULT_TARGET_FLOAT
+/* Default cpu (-mcpu=cpu) to use to all compiler invocations. */
+#undef LLVM_DEFAULT_TARGET_MCPU
+
/* Target triple LLVM will generate code for by default */
#undef LLVM_DEFAULT_TARGET_TRIPLE
diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc
index 77eec01ee1..752c4eb28b 100644
--- a/lib/Support/Windows/Host.inc
+++ b/lib/Support/Windows/Host.inc
@@ -21,6 +21,14 @@ std::string sys::getDefaultTargetTriple() {
return LLVM_DEFAULT_TARGET_TRIPLE;
}
+std::string sys::getDefaultTargetCpu() {
+ return LLVM_DEFAULT_TARGET_MCPU;
+}
+
+bool sys::hasDefaultTargetCpu() {
+ return getDefaultTargetCpu() != "";
+}
+
std::string sys::getDefaultTargetFloat() {
return LLVM_DEFAULT_TARGET_FLOAT;
}