summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-05 00:13:21 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-10 16:07:39 +0200
commit38b7bf5fd05046a52788f143f18ef599c7070605 (patch)
tree06b639de347a95713128549f7d83c9a0ce89cfc9 /include
parentba3f69880173704282425d929129ade3652b4af1 (diff)
downloadllvm-38b7bf5fd05046a52788f143f18ef599c7070605.tar.gz
llvm-38b7bf5fd05046a52788f143f18ef599c7070605.tar.bz2
llvm-38b7bf5fd05046a52788f143f18ef599c7070605.tar.xz
[Embtk] Give ability to specify default -mcpu
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> (cherry picked from commit 0f3b0d56e88a03d371d2e03ab715e44b2693c96f)
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Config/config.h.in3
-rw-r--r--include/llvm/Support/Host.h8
2 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in
index 950e66f275..1667216953 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -575,6 +575,9 @@
/* Installation directory for data files */
#undef LLVM_DATADIR
+/* 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/include/llvm/Support/Host.h b/include/llvm/Support/Host.h
index 9a4036a8af..748e5e2cdf 100644
--- a/include/llvm/Support/Host.h
+++ b/include/llvm/Support/Host.h
@@ -46,6 +46,14 @@ namespace sys {
/// CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM
std::string getDefaultTargetTriple();
+ /// getDefaultTargetCpu() - Return the default target cpu for which the
+ /// compiler is configured to generate code for (ie. -mcpu), or "" if empty.
+ std::string getDefaultTargetCpu();
+
+ /// hasDefaultTargetCpu() - Return true if the compiler was configured to
+ /// generate by default code for a given target cpu and false otherwise.
+ bool hasDefaultTargetCpu();
+
/// getProcessTriple() - Return an appropriate target triple for generating
/// code to be loaded into the current process, e.g. when using the JIT.
std::string getProcessTriple();