Use a 'extra_libs' key instead of 'properties'.
'properties' is too close of the meson definition and we need to duplicate the entries for 'c_link_args' and 'cpp_link_args'. By using 'extra_libs' we have a more functional definition of what we want.
This commit is contained in:
parent
29bba313bc
commit
940cea290d
|
@ -25,10 +25,7 @@ CROSS_ENV = {
|
||||||
'fedora_win32': {
|
'fedora_win32': {
|
||||||
'toolchain_names': ['mingw32_toolchain'],
|
'toolchain_names': ['mingw32_toolchain'],
|
||||||
'root_path': '/usr/i686-w64-mingw32/sys-root/mingw',
|
'root_path': '/usr/i686-w64-mingw32/sys-root/mingw',
|
||||||
'properties': {
|
'extra_libs': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4', '-lmsvcr90'],
|
||||||
'c_link_args': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4'],
|
|
||||||
'cpp_link_args': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4']
|
|
||||||
},
|
|
||||||
'host_machine': {
|
'host_machine': {
|
||||||
'system': 'windows',
|
'system': 'windows',
|
||||||
'cpu_family': 'x86',
|
'cpu_family': 'x86',
|
||||||
|
@ -42,10 +39,7 @@ CROSS_ENV = {
|
||||||
'debian_win32': {
|
'debian_win32': {
|
||||||
'toolchain_names': ['mingw32_toolchain'],
|
'toolchain_names': ['mingw32_toolchain'],
|
||||||
'root_path': '/usr/i686-w64-mingw32/',
|
'root_path': '/usr/i686-w64-mingw32/',
|
||||||
'properties': {
|
'extra_libs': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4', '-lmsvcr90'],
|
||||||
'c_link_args': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4'],
|
|
||||||
'cpp_link_args': ['-lwinmm', '-lws2_32', '-lshlwapi', '-lrpcrt4']
|
|
||||||
},
|
|
||||||
'host_machine': {
|
'host_machine': {
|
||||||
'system': 'windows',
|
'system': 'windows',
|
||||||
'cpu_family': 'x86',
|
'cpu_family': 'x86',
|
||||||
|
@ -487,7 +481,8 @@ class mingw32_toolchain(Toolchain):
|
||||||
|
|
||||||
env['PKG_CONFIG_LIBDIR'] = pj(self.root_path, 'lib', 'pkgconfig')
|
env['PKG_CONFIG_LIBDIR'] = pj(self.root_path, 'lib', 'pkgconfig')
|
||||||
env['CFLAGS'] = " -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CFLAGS']
|
env['CFLAGS'] = " -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CFLAGS']
|
||||||
env['CXXFLAGS'] =" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CXXFLAGS']
|
env['CXXFLAGS'] = " -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 "+env['CXXFLAGS']
|
||||||
|
env['LIBS'] = " ".join(self.buildEnv.cross_env['extra_libs']) + " " +env['LIBS']
|
||||||
|
|
||||||
|
|
||||||
class Builder:
|
class Builder:
|
||||||
|
|
|
@ -6,8 +6,8 @@ cpp = '{toolchain.binaries[CXX]}'
|
||||||
strip = '{toolchain.binaries[STRIP]}'
|
strip = '{toolchain.binaries[STRIP]}'
|
||||||
|
|
||||||
[properties]
|
[properties]
|
||||||
c_link_args = {properties[c_link_args]!r}
|
c_link_args = {extra_libs!r}
|
||||||
cpp_link_args = {properties[cpp_link_args]!r}
|
cpp_link_args = {extra_libs!r}
|
||||||
|
|
||||||
[host_machine]
|
[host_machine]
|
||||||
cpu_family = '{host_machine[cpu_family]}'
|
cpu_family = '{host_machine[cpu_family]}'
|
||||||
|
|
Loading…
Reference in New Issue