[omp] Add a configuration variable for the default OpenMP runtime.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 28 May 2015 01:47:22 +0000 (01:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 28 May 2015 01:47:22 +0000 (01:47 +0000)
This will be used in my next commit to Clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238388 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/configure.ac
configure
include/llvm/Config/config.h.in

index 586f3f26cb313ba5aa00d6f8b8c1508ad11cffac..5ca40ec373b6af0d5f44192e8aa6785620621e87 100644 (file)
@@ -1337,6 +1337,13 @@ AC_ARG_WITH(default-sysroot,
 AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval",
                    [Default <path> to all compiler invocations for --sysroot=<path>.])
 
 AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval",
                    [Default <path> to all compiler invocations for --sysroot=<path>.])
 
+AC_ARG_WITH(clang-default-openmp-runtime,
+  AS_HELP_STRING([--with-clang-default-openmp-runtime],
+    [The default OpenMP runtime for Clang.]),,
+    withval="")
+AC_DEFINE_UNQUOTED(CLANG_DEFAULT_OPENMP_RUNTIME,"$withval",
+                   [Default OpenMP runtime used by -fopenmp.])
+
 dnl Allow linking of LLVM with GPLv3 binutils code.
 AC_ARG_WITH(binutils-include,
   AS_HELP_STRING([--with-binutils-include],
 dnl Allow linking of LLVM with GPLv3 binutils code.
 AC_ARG_WITH(binutils-include,
   AS_HELP_STRING([--with-binutils-include],
index 37f3d7d95ae66434f7480c85fd1b749291886b18..b3ccccbb881c65eda93753ffac3d67870fe50799 100755 (executable)
--- a/configure
+++ b/configure
@@ -1495,6 +1495,8 @@ Optional Packages:
                           search for headers
   --with-gcc-toolchain    Directory where gcc is installed.
   --with-default-sysroot  Add --sysroot=<path> to all compiler invocations.
                           search for headers
   --with-gcc-toolchain    Directory where gcc is installed.
   --with-default-sysroot  Add --sysroot=<path> to all compiler invocations.
+  --with-clang-default-openmp-runtime
+                          The default OpenMP runtime for Clang.
   --with-binutils-include Specify path to binutils/include/ containing
                           plugin-api.h file for gold plugin.
   --with-bug-report-url   Specify the URL where bug reports should be
   --with-binutils-include Specify path to binutils/include/ containing
                           plugin-api.h file for gold plugin.
   --with-bug-report-url   Specify the URL where bug reports should be
@@ -5948,6 +5950,20 @@ _ACEOF
 
 
 
 
 
 
+# Check whether --with-clang-default-openmp-runtime was given.
+if test "${with_clang_default_openmp_runtime+set}" = set; then
+  withval=$with_clang_default_openmp_runtime;
+else
+  withval=""
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define CLANG_DEFAULT_OPENMP_RUNTIME "$withval"
+_ACEOF
+
+
+
 # Check whether --with-binutils-include was given.
 if test "${with_binutils_include+set}" = set; then
   withval=$with_binutils_include;
 # Check whether --with-binutils-include was given.
 if test "${with_binutils_include+set}" = set; then
   withval=$with_binutils_include;
index 67d7c8485a402680f926584775f2370f123be66f..211e1d0fad01c4aebb300e197985aa38e05d145a 100644 (file)
@@ -6,6 +6,9 @@
 /* Bug report URL. */
 #undef BUG_REPORT_URL
 
 /* Bug report URL. */
 #undef BUG_REPORT_URL
 
+/* Default OpenMP runtime used by -fopenmp. */
+#undef CLANG_DEFAULT_OPENMP_RUNTIME
+
 /* Define if we have libxml2 */
 #undef CLANG_HAVE_LIBXML
 
 /* Define if we have libxml2 */
 #undef CLANG_HAVE_LIBXML