build: disable flto partition on arm as well

build: properly detect arm32 build target
This commit is contained in:
jeefo 2023-07-03 17:18:42 +03:00
commit c36755c2db
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
2 changed files with 13 additions and 7 deletions

@ -1 +1 @@
Subproject commit 71bcf0e921611f591b2a2f9c68368f2dd158279e
Subproject commit ec088698ab73e6683a8dd1c74310aaf20be60256

View file

@ -102,7 +102,7 @@ if cxx == 'clang' or cxx == 'gcc'
'-fno-threadsafe-statics', '-pthread'
]
if not opt_native
if not opt_native and cpu != 'arm'
cxxflags += '-mtune=generic'
endif
@ -110,7 +110,7 @@ if cxx == 'clang' or cxx == 'gcc'
cxxflags += [
'-march=armv8-a+fp+simd',
]
else
elif cpu != 'arm'
cxxflags += [
'-mmmx', '-msse', '-msse2', '-msse3', '-mssse3', '-mfpmath=sse'
]
@ -128,7 +128,7 @@ if cxx == 'clang' or cxx == 'gcc'
'-funroll-loops', '-fomit-frame-pointer', '-fno-stack-protector', '-fvisibility=hidden', '-fvisibility-inlines-hidden'
]
if os != 'darwin' and os != 'windows' and cpu != 'aarch64'
if os != 'darwin' and os != 'windows' and cpu != 'aarch64' and cpu != 'arm'
cxxflags += [
'-fdata-sections',
'-ffunction-sections',
@ -145,10 +145,16 @@ if cxx == 'clang' or cxx == 'gcc'
'-fgraphite-identity', '-floop-nest-optimize'
]
ldflags += [
'-fgraphite-identity', '-floop-nest-optimize', '-flto-partition=none'
'-fgraphite-identity', '-floop-nest-optimize'
]
endif
endif
if os != 'darwin' and os != 'windows'
ldflags += [
'-flto-partition=none'
]
endif
else
cxxflags += ['-g3', '-ggdb', '-DDEBUG', '-D_FORTIFY_SOURCE=2']
endif
@ -174,7 +180,7 @@ if cxx == 'clang' or cxx == 'gcc'
endif
# by default we buid 32bit binaries
if cpu != 'aarch64' and not opt_64bit
if not opt_64bit and cpu != 'arm'
cxxflags += '-m32'
ldflags += '-m32'
@ -293,4 +299,4 @@ shared_library(
)
run_target('package',
command: ['python3', meson.project_source_root() + '/package.py', '@0@.@1@'.format(bot_version, count)])
command: ['python3', meson.project_source_root() + '/package.py', '@0@.@1@'.format(bot_version, count)])