Skip to content

Commit b4e3956

Browse files
committed
Split off -m32 handling to new PR llvm#142742.
1 parent e29144d commit b4e3956

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

openmp/runtime/cmake/LibompHandleFlags.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ function(libomp_get_cxxflags cxxflags)
6060
libomp_append(flags_local -Qinline-min-size=1 LIBOMP_HAVE_INLINE_MIN_SIZE_FLAG)
6161
endif()
6262
# Architectural C and C++ flags
63-
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
64-
libomp_append(flags_local -m32 LIBOMP_HAVE_M32_FLAG)
65-
endif()
6663
if(${IA32})
64+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
65+
libomp_append(flags_local -m32 LIBOMP_HAVE_M32_FLAG)
66+
endif()
6767
libomp_append(flags_local /arch:SSE2 LIBOMP_HAVE_ARCH_SSE2_FLAG)
6868
libomp_append(flags_local -msse2 LIBOMP_HAVE_MSSE2_FLAG)
6969
libomp_append(flags_local -falign-stack=maintain-16-byte LIBOMP_HAVE_FALIGN_STACK_FLAG)
@@ -81,10 +81,10 @@ endfunction()
8181
function(libomp_get_asmflags asmflags)
8282
set(asmflags_local)
8383
# Architectural assembler flags
84-
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
85-
libomp_append(asmflags_local -m32 LIBOMP_HAVE_M32_FLAG)
86-
endif()
8784
if(${IA32})
85+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
86+
libomp_append(asmflags_local -m32 LIBOMP_HAVE_M32_FLAG)
87+
endif()
8888
libomp_append(asmflags_local /safeseh LIBOMP_HAVE_SAFESEH_MASM_FLAG)
8989
libomp_append(asmflags_local /coff LIBOMP_HAVE_COFF_MASM_FLAG)
9090
elseif(${MIC})
@@ -112,10 +112,10 @@ function(libomp_get_ldflags ldflags)
112112
libomp_append(ldflags_local -static-intel LIBOMP_HAVE_STATIC_INTEL_FLAG)
113113
libomp_append(ldflags_local /SAFESEH LIBOMP_HAVE_SAFESEH_FLAG)
114114
# Architectural linker flags
115-
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
116-
libomp_append(ldflags_local -m32 LIBOMP_HAVE_M32_FLAG)
117-
endif()
118115
if(${IA32})
116+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
117+
libomp_append(ldflags_local -m32 LIBOMP_HAVE_M32_FLAG)
118+
endif()
119119
libomp_append(ldflags_local -msse2 LIBOMP_HAVE_MSSE2_FLAG)
120120
elseif(${MIC})
121121
libomp_append(ldflags_local -mmic LIBOMP_HAVE_MMIC_FLAG)
@@ -162,7 +162,7 @@ endfunction()
162162
# Fortran flags
163163
function(libomp_get_fflags fflags)
164164
set(fflags_local)
165-
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
165+
if(${IA32})
166166
libomp_append(fflags_local -m32 LIBOMP_HAVE_M32_FORTRAN_FLAG)
167167
endif()
168168
set(fflags_local ${fflags_local} ${LIBOMP_FFLAGS})

0 commit comments

Comments
 (0)