diff options
Diffstat (limited to 'openmp/runtime/cmake')
| -rw-r--r-- | openmp/runtime/cmake/BuildPLRules.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/Clang/AsmFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/Clang/CFlags.cmake | 12 | ||||
| -rw-r--r-- | openmp/runtime/cmake/CommonFlags.cmake | 51 | ||||
| -rw-r--r-- | openmp/runtime/cmake/Definitions.cmake | 9 | ||||
| -rw-r--r-- | openmp/runtime/cmake/GNU/AsmFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/GNU/CFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/GNU/FortranFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/Intel/AsmFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/Intel/CFlags.cmake | 12 | ||||
| -rw-r--r-- | openmp/runtime/cmake/Intel/FortranFlags.cmake | 19 | ||||
| -rw-r--r-- | openmp/runtime/cmake/MSVC/AsmFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/MSVC/CFlags.cmake | 11 | ||||
| -rw-r--r-- | openmp/runtime/cmake/MicroTests.cmake | 18 | ||||
| -rw-r--r-- | openmp/runtime/cmake/SourceFiles.cmake | 11 |
15 files changed, 189 insertions, 31 deletions
diff --git a/openmp/runtime/cmake/BuildPLRules.cmake b/openmp/runtime/cmake/BuildPLRules.cmake index 8db0f2f5576..01af0589312 100644 --- a/openmp/runtime/cmake/BuildPLRules.cmake +++ b/openmp/runtime/cmake/BuildPLRules.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + ############################################################################### # This file contains additional build rules that correspond to build.pl's rules # Building libiomp5.dbg is linux only, Windows will build libiomp5md.dll.pdb diff --git a/openmp/runtime/cmake/Clang/AsmFlags.cmake b/openmp/runtime/cmake/Clang/AsmFlags.cmake index b23e6b9a499..da2b6666880 100644 --- a/openmp/runtime/cmake/Clang/AsmFlags.cmake +++ b/openmp/runtime/cmake/Clang/AsmFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Clang (clang/clang++) specific compiler dependent flags # The flag types are: # 1) Assembly flags diff --git a/openmp/runtime/cmake/Clang/CFlags.cmake b/openmp/runtime/cmake/Clang/CFlags.cmake index 54e180972d6..e0c14a0c937 100644 --- a/openmp/runtime/cmake/Clang/CFlags.cmake +++ b/openmp/runtime/cmake/Clang/CFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Clang (clang/clang++) specific compiler dependent flags # The flag types are: # 1) C/C++ Compiler flags @@ -19,6 +30,7 @@ function(append_compiler_specific_c_and_cxx_flags input_c_flags input_cxx_flags) endif() append_c_and_cxx_flags("-Wno-unused-value") # Don't warn about unused values append_c_and_cxx_flags("-Wno-switch") # Don't warn about switch statements that don't cover entire range of values + append_c_and_cxx_flags("-Wno-deprecated-register") # Don't warn about using register keyword set(${input_c_flags} ${${input_c_flags}} "${local_c_flags}" PARENT_SCOPE) set(${input_cxx_flags} ${${input_cxx_flags}} "${local_cxx_flags}" PARENT_SCOPE) endfunction() diff --git a/openmp/runtime/cmake/CommonFlags.cmake b/openmp/runtime/cmake/CommonFlags.cmake index 301a3c4e742..01063d0f383 100644 --- a/openmp/runtime/cmake/CommonFlags.cmake +++ b/openmp/runtime/cmake/CommonFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds the common flags independent of compiler # The flag types are: # 1) Assembly flags (append_asm_flags_common) @@ -71,22 +82,21 @@ function(append_linker_flags_common input_ld_flags input_ld_flags_libs) set(local_ld_flags) set(local_ld_flags_libs) - ################################# - # Windows linker flags - if(${WINDOWS}) + if(${USE_PREDEFINED_LINKER_FLAGS}) + + ################################# + # Windows linker flags + if(${WINDOWS}) - ################## - # MAC linker flags - elseif(${MAC}) - if(${USE_PREDEFINED_LINKER_FLAGS}) + ################## + # MAC linker flags + elseif(${MAC}) append_linker_flags("-single_module") append_linker_flags("-current_version ${version}.0") append_linker_flags("-compatibility_version ${version}.0") - endif() - ##################################################################################### - # Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) linker flags - elseif(${MIC}) - if(${USE_PREDEFINED_LINKER_FLAGS}) + ##################################################################################### + # Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) linker flags + elseif(${MIC}) append_linker_flags("-Wl,-x") append_linker_flags("-Wl,--warn-shared-textrel") # Warn if the linker adds a DT_TEXTREL to a shared object. append_linker_flags("-Wl,--as-needed") @@ -98,13 +108,11 @@ function(append_linker_flags_common input_ld_flags input_ld_flags_libs) if(${STATS_GATHERING}) append_linker_flags_library("-Wl,-lstdc++") # link in standard c++ library (stats-gathering needs it) endif() - endif() - ######################### - # Unix based linker flags - else() - # For now, always include --version-script flag on Unix systems. - append_linker_flags("-Wl,--version-script=${src_dir}/exports_so.txt") # Use exports_so.txt as version script to create versioned symbols for ELF libraries - if(${USE_PREDEFINED_LINKER_FLAGS}) + ######################### + # Unix based linker flags + else() + # For now, always include --version-script flag on Unix systems. + append_linker_flags("-Wl,--version-script=${src_dir}/exports_so.txt") # Use exports_so.txt as version script to create versioned symbols for ELF libraries append_linker_flags("-Wl,-z,noexecstack") # Marks the object as not requiring executable stack. append_linker_flags("-Wl,--as-needed") # Only adds library dependencies as they are needed. (if libiomp5 actually uses a function from the library, then add it) if(NOT ${STUBS_LIBRARY}) @@ -117,8 +125,9 @@ function(append_linker_flags_common input_ld_flags input_ld_flags_libs) append_linker_flags_library("-Wl,-ldl") # link in libdl (dynamic loader library) endif() endif() - endif() # if(${USE_PREDEFINED_LINKER_FLAGS}) - endif() # if(${OPERATING_SYSTEM}) ... + endif() # if(${OPERATING_SYSTEM}) ... + + endif() # USE_PREDEFINED_LINKER_FLAGS set(${input_ld_flags} "${${input_ld_flags}}" "${local_ld_flags}" "${USER_LD_FLAGS}" PARENT_SCOPE) set(${input_ld_flags_libs} "${${input_ld_flags_libs}}" "${local_ld_flags_libs}" "${USER_LD_LIB_FLAGS}" PARENT_SCOPE) diff --git a/openmp/runtime/cmake/Definitions.cmake b/openmp/runtime/cmake/Definitions.cmake index bdd11ab678e..dafbff28abb 100644 --- a/openmp/runtime/cmake/Definitions.cmake +++ b/openmp/runtime/cmake/Definitions.cmake @@ -42,6 +42,10 @@ function(append_cpp_flags input_cpp_flags) endif() append_definitions("-D INTEL_ITTNOTIFY_PREFIX=__kmp_itt_") + if(${USE_VERSION_SYMBOLS}) + append_definitions("-D KMP_USE_VERSION_SYMBOLS") + endif() + ##################### # Windows definitions if(${WINDOWS}) @@ -133,6 +137,11 @@ function(append_cpp_flags input_cpp_flags) append_definitions("-D KMP_USE_ADAPTIVE_LOCKS=0") append_definitions("-D KMP_DEBUG_ADAPTIVE_LOCKS=0") endif() + if(${USE_INTERNODE_ALIGNMENT}) + append_definitions("-D KMP_USE_INTERNODE_ALIGNMENT=1") + else() + append_definitions("-D KMP_USE_INTERNODE_ALIGNMENT=0") + endif() set(${input_cpp_flags} "${${input_cpp_flags}}" "${local_cpp_flags}" "${USER_CPP_FLAGS}" "$ENV{CPPFLAGS}" PARENT_SCOPE) endfunction() diff --git a/openmp/runtime/cmake/GNU/AsmFlags.cmake b/openmp/runtime/cmake/GNU/AsmFlags.cmake index 91fccb07947..c422349e5e9 100644 --- a/openmp/runtime/cmake/GNU/AsmFlags.cmake +++ b/openmp/runtime/cmake/GNU/AsmFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds GNU (gcc/g++) specific compiler dependent flags # The flag types are: # 1) Assembly flags diff --git a/openmp/runtime/cmake/GNU/CFlags.cmake b/openmp/runtime/cmake/GNU/CFlags.cmake index 88654ccc27a..4785a3cdc07 100644 --- a/openmp/runtime/cmake/GNU/CFlags.cmake +++ b/openmp/runtime/cmake/GNU/CFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds GNU (gcc/g++) specific compiler dependent flags # The flag types are: # 2) C/C++ Compiler flags diff --git a/openmp/runtime/cmake/GNU/FortranFlags.cmake b/openmp/runtime/cmake/GNU/FortranFlags.cmake index 2a479b28dd3..de79850d4f2 100644 --- a/openmp/runtime/cmake/GNU/FortranFlags.cmake +++ b/openmp/runtime/cmake/GNU/FortranFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds GNU (gcc/g++) specific compiler dependent flags # The flag types are: # 1) Fortran Compiler flags diff --git a/openmp/runtime/cmake/Intel/AsmFlags.cmake b/openmp/runtime/cmake/Intel/AsmFlags.cmake index 59d22d99502..2800af54d80 100644 --- a/openmp/runtime/cmake/Intel/AsmFlags.cmake +++ b/openmp/runtime/cmake/Intel/AsmFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags # The flag types are: # 1) Assembly flags diff --git a/openmp/runtime/cmake/Intel/CFlags.cmake b/openmp/runtime/cmake/Intel/CFlags.cmake index 2122e29933d..5d4b54565c0 100644 --- a/openmp/runtime/cmake/Intel/CFlags.cmake +++ b/openmp/runtime/cmake/Intel/CFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags # The flag types are: # 2) C/C++ Compiler flags @@ -41,7 +52,6 @@ function(append_compiler_specific_c_and_cxx_flags input_c_flags input_cxx_flags) endif() else() append_c_and_cxx_flags("-Wsign-compare") # warn on sign comparisons - append_c_and_cxx_flags("-Werror") # Changes all warnings to errors. append_c_and_cxx_flags("-Qoption,cpp,--extended_float_types") # Enabled _Quad type. append_c_and_cxx_flags("-fno-exceptions") # Exception handling table generation is disabled. append_c_and_cxx_flags("-x c++") # Compile C files as C++ files diff --git a/openmp/runtime/cmake/Intel/FortranFlags.cmake b/openmp/runtime/cmake/Intel/FortranFlags.cmake index 9279a887e88..5fb16563fa3 100644 --- a/openmp/runtime/cmake/Intel/FortranFlags.cmake +++ b/openmp/runtime/cmake/Intel/FortranFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Intel(R) C Compiler / Intel(R) C++ Compiler / Intel(R) Fortran Compiler (icc/icpc/icl.exe/ifort) dependent flags # The flag types are: # 1) Fortran Compiler flags @@ -17,12 +28,20 @@ function(append_fortran_compiler_specific_fort_flags input_fort_flags) append_fort_flags("-GS") append_fort_flags("-DynamicBase") append_fort_flags("-Zi") + # On Linux and Windows Intel(R) 64 architecture we need offload attribute + # for all Fortran entries in order to support OpenMP function calls inside device contructs + if(${INTEL64}) + append_fort_flags("/Qoffload-attribute-target:mic") + endif() else() if(${MIC}) append_fort_flags("-mmic") endif() if(NOT ${MAC}) append_fort_flags("-sox") + if(${INTEL64} AND ${LINUX}) + append_fort_flags("-offload-attribute-target=mic") + endif() endif() endif() set(${input_fort_flags} ${${input_fort_flags}} "${local_fort_flags}" PARENT_SCOPE) diff --git a/openmp/runtime/cmake/MSVC/AsmFlags.cmake b/openmp/runtime/cmake/MSVC/AsmFlags.cmake index dcc83021183..685762de17e 100644 --- a/openmp/runtime/cmake/MSVC/AsmFlags.cmake +++ b/openmp/runtime/cmake/MSVC/AsmFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Microsoft Visual Studio dependent flags # The flag types are: # 1) Assembly flags diff --git a/openmp/runtime/cmake/MSVC/CFlags.cmake b/openmp/runtime/cmake/MSVC/CFlags.cmake index b76147a0ded..2b17cebe7f5 100644 --- a/openmp/runtime/cmake/MSVC/CFlags.cmake +++ b/openmp/runtime/cmake/MSVC/CFlags.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + # This file holds Microsoft Visual Studio dependent flags # The flag types are: # 1) C/C++ Compiler flags diff --git a/openmp/runtime/cmake/MicroTests.cmake b/openmp/runtime/cmake/MicroTests.cmake index 50beb594db8..dffc4ee53c5 100644 --- a/openmp/runtime/cmake/MicroTests.cmake +++ b/openmp/runtime/cmake/MicroTests.cmake @@ -1,3 +1,14 @@ +# +#//===----------------------------------------------------------------------===// +#// +#// The LLVM Compiler Infrastructure +#// +#// This file is dual licensed under the MIT and the University of Illinois Open +#// Source Licenses. See LICENSE.txt for details. +#// +#//===----------------------------------------------------------------------===// +# + ###################################################### # MICRO TESTS # The following micro-tests are small tests to perform on @@ -219,15 +230,14 @@ if(${test_deps} AND ${tests}) set(td_exp libc.so.7 libthr.so.3 libunwind.so.5) elseif(${LINUX}) set(td_exp libdl.so.2,libgcc_s.so.1) - if(NOT ${IA32} AND NOT ${INTEL64}) - set(td_exp ${td_exp},libffi.so.6,libffi.so.5) - endif() if(${IA32}) set(td_exp ${td_exp},libc.so.6,ld-linux.so.2) elseif(${INTEL64}) set(td_exp ${td_exp},libc.so.6,ld-linux-x86-64.so.2) elseif(${ARM}) - set(td_exp ${td_exp},libc.so.6,ld-linux-armhf.so.3) + set(td_exp ${td_exp},libffi.so.6,libffi.so.5,libc.so.6,ld-linux-armhf.so.3) + elseif(${PPC64}) + set(td_exp ${td_exp},libc.so.6,ld64.so.1) endif() if(${STD_CPP_LIB}) set(td_exp ${td_exp},libstdc++.so.6) diff --git a/openmp/runtime/cmake/SourceFiles.cmake b/openmp/runtime/cmake/SourceFiles.cmake index a884feaf51b..dcc78cbb176 100644 --- a/openmp/runtime/cmake/SourceFiles.cmake +++ b/openmp/runtime/cmake/SourceFiles.cmake @@ -69,7 +69,8 @@ endfunction() function(set_cpp_files input_cpp_source_files) set(local_cpp_source_files "") if(NOT ${STUBS_LIBRARY}) - #append_cpp_source_file("kmp_barrier.cpp") + append_cpp_source_file("kmp_barrier.cpp") + append_cpp_source_file("kmp_wait_release.cpp") append_cpp_source_file("kmp_affinity.cpp") append_cpp_source_file("kmp_dispatch.cpp") append_cpp_source_file("kmp_lock.cpp") @@ -78,10 +79,10 @@ function(set_cpp_files input_cpp_source_files) append_cpp_source_file("kmp_taskdeps.cpp") append_cpp_source_file("kmp_cancel.cpp") endif() - #if(${STATS_GATHERING}) - # append_cpp_source_file("kmp_stats.cpp") - # append_cpp_source_file("kmp_stats_timing.cpp") - #endif() + if(${STATS_GATHERING}) + append_cpp_source_file("kmp_stats.cpp") + append_cpp_source_file("kmp_stats_timing.cpp") + endif() endif() set(${input_cpp_source_files} "${local_cpp_source_files}" PARENT_SCOPE) |

