From af84995d06bb792e77e84f9a04361e8b0268e800 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Thu, 3 Apr 2014 17:54:47 +0200 Subject: [Embtk] Give ability to specify default -mcpu Signed-off-by: Abdoulaye Walsimou Gaye --- lib/Support/Unix/Host.inc | 8 ++++++++ lib/Support/Windows/Host.inc | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'lib') 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() != ""; +} -- cgit v1.2.3