diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2014-04-03 17:54:47 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2014-04-13 01:56:54 +0200 |
commit | af84995d06bb792e77e84f9a04361e8b0268e800 (patch) | |
tree | 7f5bbc7ed58d568c850367893c70beecdfb73d0a /include/llvm | |
parent | ebef5e2348f15db2e965b6392375323719ccd54f (diff) | |
download | llvm-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 'include/llvm')
-rw-r--r-- | include/llvm/Config/config.h.cmake | 3 | ||||
-rw-r--r-- | include/llvm/Config/config.h.in | 3 | ||||
-rw-r--r-- | include/llvm/Config/llvm-config.h.cmake | 3 | ||||
-rw-r--r-- | include/llvm/Config/llvm-config.h.in | 3 | ||||
-rw-r--r-- | include/llvm/Support/Host.h | 8 |
5 files changed, 20 insertions, 0 deletions
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index 5c72ad8a99..d91022829f 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -504,6 +504,9 @@ /* Installation directory for data files */ #cmakedefine LLVM_DATADIR "${LLVM_DATADIR}" +/* 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/config.h.in b/include/llvm/Config/config.h.in index 2317823349..f147abbb5d 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -539,6 +539,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/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake index 80616ef950..be6338c40c 100644 --- a/include/llvm/Config/llvm-config.h.cmake +++ b/include/llvm/Config/llvm-config.h.cmake @@ -25,6 +25,9 @@ /* Installation directory for data files */ #cmakedefine LLVM_DATADIR "${LLVM_DATADIR}" +/* 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 a4fae5537a..18fdf3fe84 100644 --- a/include/llvm/Config/llvm-config.h.in +++ b/include/llvm/Config/llvm-config.h.in @@ -25,6 +25,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 28c4cc790f..192fbd4d64 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(); |