Skip to content

Commit cc83ce4

Browse files
committed
[omp] Add a configuration variable for the default OpenMP runtime.
This will be used in my next commit to Clang. llvm-svn: 238388
1 parent 2e81434 commit cc83ce4

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

llvm/autoconf/configure.ac

+7
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,13 @@ AC_ARG_WITH(default-sysroot,
13371337
AC_DEFINE_UNQUOTED(DEFAULT_SYSROOT,"$withval",
13381338
[Default <path> to all compiler invocations for --sysroot=<path>.])
13391339

1340+
AC_ARG_WITH(clang-default-openmp-runtime,
1341+
AS_HELP_STRING([--with-clang-default-openmp-runtime],
1342+
[The default OpenMP runtime for Clang.]),,
1343+
withval="")
1344+
AC_DEFINE_UNQUOTED(CLANG_DEFAULT_OPENMP_RUNTIME,"$withval",
1345+
[Default OpenMP runtime used by -fopenmp.])
1346+
13401347
dnl Allow linking of LLVM with GPLv3 binutils code.
13411348
AC_ARG_WITH(binutils-include,
13421349
AS_HELP_STRING([--with-binutils-include],

llvm/configure

+16
Original file line numberDiff line numberDiff line change
@@ -1495,6 +1495,8 @@ Optional Packages:
14951495
search for headers
14961496
--with-gcc-toolchain Directory where gcc is installed.
14971497
--with-default-sysroot Add --sysroot=<path> to all compiler invocations.
1498+
--with-clang-default-openmp-runtime
1499+
The default OpenMP runtime for Clang.
14981500
--with-binutils-include Specify path to binutils/include/ containing
14991501
plugin-api.h file for gold plugin.
15001502
--with-bug-report-url Specify the URL where bug reports should be
@@ -5948,6 +5950,20 @@ _ACEOF
59485950

59495951

59505952

5953+
# Check whether --with-clang-default-openmp-runtime was given.
5954+
if test "${with_clang_default_openmp_runtime+set}" = set; then
5955+
withval=$with_clang_default_openmp_runtime;
5956+
else
5957+
withval=""
5958+
fi
5959+
5960+
5961+
cat >>confdefs.h <<_ACEOF
5962+
#define CLANG_DEFAULT_OPENMP_RUNTIME "$withval"
5963+
_ACEOF
5964+
5965+
5966+
59515967
# Check whether --with-binutils-include was given.
59525968
if test "${with_binutils_include+set}" = set; then
59535969
withval=$with_binutils_include;

llvm/include/llvm/Config/config.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
/* Bug report URL. */
77
#undef BUG_REPORT_URL
88

9+
/* Default OpenMP runtime used by -fopenmp. */
10+
#undef CLANG_DEFAULT_OPENMP_RUNTIME
11+
912
/* Define if we have libxml2 */
1013
#undef CLANG_HAVE_LIBXML
1114

0 commit comments

Comments
 (0)