@@ -114,25 +114,18 @@ function(_duckdb_validate_jemalloc_config)
114114 return ()
115115 endif ()
116116
117- # jemalloc is only allowed in linux and osx debug builds
118- if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "Linux" )
119- set (supported_os TRUE )
120- else ()
121- set (supported_os FALSE )
122- endif ()
123-
124- # jemalloc is only allowed in debug builds
125- if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND supported_os)
117+ # jemalloc is only enabled on 64bit x86 linux builds
118+ if (CMAKE_SIZEOF_VOID_P EQUAL 8
119+ AND OS_NAME STREQUAL "linux"
120+ AND NOT BSD)
126121 set (jemalloc_allowed TRUE )
127122 else ()
128123 set (jemalloc_allowed FALSE )
129124 endif ()
130125
131126 if (NOT jemalloc_allowed)
132- message (
133- WARNING
134- "jemalloc extension is only supported on Linux and OSX in Debug builds.\n "
135- "Removing jemalloc from extension list." )
127+ message (WARNING "jemalloc extension is only supported on Linux.\n "
128+ "Removing jemalloc from extension list." )
136129 # Remove jemalloc from the extension list
137130 string (REPLACE "jemalloc" "" BUILD_EXTENSIONS_FILTERED
138131 "${BUILD_EXTENSIONS} " )
@@ -187,17 +180,17 @@ function(_duckdb_create_interface_target target_name)
187180 if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
188181 target_compile_options (
189182 ${target_name}
190- INTERFACE
191- /wd4244 # suppress Conversion from 'type1' to 'type2', possible loss of
192- # data
193- /wd4267 # suppress Conversion from ‘size_t’ to ‘type’, possible loss of
194- # data
195- /wd4200 # suppress Nonstandard extension used: zero-sized array in
196- # struct/union
197- /wd26451
198- /wd26495 # suppress Code Analysis
199- /D_CRT_SECURE_NO_WARNINGS # suppress warnings about unsafe functions
200- /utf-8 # treat source files as UTF-8 encoded
183+ INTERFACE /wd4244 # suppress Conversion from 'type1' to 'type2', possible
184+ # loss of data
185+ /wd4267 # suppress Conversion from ‘size_t’ to ‘type’, possible
186+ # loss of data
187+ /wd4200 # suppress Nonstandard extension used: zero-sized array
188+ # in struct/union
189+ /wd26451
190+ /wd26495 # suppress Code Analysis
191+ /D_CRT_SECURE_NO_WARNINGS # suppress warnings about unsafe
192+ # functions
193+ /utf-8 # treat source files as UTF-8 encoded
201194 )
202195 elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
203196 target_compile_options (
0 commit comments