[Openmp-commits] [openmp] f105c1d - [OpenMP] Remove the workaround of passing "-x assembler-with-cpp" manually

Martin Storsjö via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 7 13:33:25 PDT 2023


Author: Martin Storsjö
Date: 2023-07-07T23:32:27+03:00
New Revision: f105c1dc58eee3e0125587daa3898282daa415b3

URL: https://github.com/llvm/llvm-project/commit/f105c1dc58eee3e0125587daa3898282daa415b3
DIFF: https://github.com/llvm/llvm-project/commit/f105c1dc58eee3e0125587daa3898282daa415b3.diff

LOG: [OpenMP] Remove the workaround of passing "-x assembler-with-cpp" manually

By building the assembly with language ASM now (since
4072c8aee4c89c4457f4f30d01dc9bb4dfa52559 and
cbaa3597aaf6273e66b3f445ed36a6458143fe6a), this shouldn't be
needed any longer.

Differential Revision: https://reviews.llvm.org/D150701

Added: 
    

Modified: 
    openmp/runtime/cmake/LibompHandleFlags.cmake
    openmp/runtime/cmake/config-ix.cmake

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/cmake/LibompHandleFlags.cmake b/openmp/runtime/cmake/LibompHandleFlags.cmake
index 092204694cafb6..bb53445be9a3bb 100644
--- a/openmp/runtime/cmake/LibompHandleFlags.cmake
+++ b/openmp/runtime/cmake/LibompHandleFlags.cmake
@@ -80,7 +80,6 @@ endfunction()
 # Assembler flags
 function(libomp_get_asmflags asmflags)
   set(asmflags_local)
-  libomp_append(asmflags_local "-x assembler-with-cpp" LIBOMP_HAVE_X_ASSEMBLER_WITH_CPP_FLAG)
   # Architectural assembler flags
   if(${IA32})
     if(CMAKE_SIZEOF_VOID_P EQUAL 8)

diff  --git a/openmp/runtime/cmake/config-ix.cmake b/openmp/runtime/cmake/config-ix.cmake
index ca3cb43c285db7..9869aeab035463 100644
--- a/openmp/runtime/cmake/config-ix.cmake
+++ b/openmp/runtime/cmake/config-ix.cmake
@@ -96,11 +96,6 @@ if(WIN32)
       )
     endforeach()
   endforeach()
-else()
-  # It is 
diff icult to create a dummy assembly file that compiles into an
-  # executable for every architecture and then check the C compiler to
-  # see if -x assembler-with-cpp exists and works, so we assume it does for non-Windows.
-  set(LIBOMP_HAVE_X_ASSEMBLER_WITH_CPP_FLAG TRUE)
 endif()
 if(${LIBOMP_FORTRAN_MODULES})
   libomp_check_fortran_flag(-m32 LIBOMP_HAVE_M32_FORTRAN_FLAG)


        


More information about the Openmp-commits mailing list