summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-04-03 17:54:47 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-04-13 01:56:54 +0200
commitaf84995d06bb792e77e84f9a04361e8b0268e800 (patch)
tree7f5bbc7ed58d568c850367893c70beecdfb73d0a /lib/Support
parentebef5e2348f15db2e965b6392375323719ccd54f (diff)
downloadllvm-af84995d06bb792e77e84f9a04361e8b0268e800.tar.gz
llvm-af84995d06bb792e77e84f9a04361e8b0268e800.tar.bz2
llvm-af84995d06bb792e77e84f9a04361e8b0268e800.tar.xz
[Embtk] Give ability to specify default -mcpu
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Unix/Host.inc8
-rw-r--r--lib/Support/Windows/Host.inc8
2 files changed, 16 insertions, 0 deletions
diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc
index 726e2fbcf0..d272ac813d 100644
--- a/lib/Support/Unix/Host.inc
+++ b/lib/Support/Unix/Host.inc
@@ -61,3 +61,11 @@ std::string sys::getDefaultTargetTriple() {
return Triple;
}
+
+std::string sys::getDefaultTargetCpu() {
+ return LLVM_DEFAULT_TARGET_MCPU;
+}
+
+bool sys::hasDefaultTargetCpu() {
+ return getDefaultTargetCpu() != "";
+}
diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc
index 2e6d6f1903..ae7e9ef9ed 100644
--- a/lib/Support/Windows/Host.inc
+++ b/lib/Support/Windows/Host.inc
@@ -20,3 +20,11 @@ using namespace llvm;
std::string sys::getDefaultTargetTriple() {
return LLVM_DEFAULT_TARGET_TRIPLE;
}
+
+std::string sys::getDefaultTargetCpu() {
+ return LLVM_DEFAULT_TARGET_MCPU;
+}
+
+bool sys::hasDefaultTargetCpu() {
+ return getDefaultTargetCpu() != "";
+}