[gcab/wip/hughsie/subproject: 3/3] Allow building on Windows



commit b55268ac1020cd6c033acb52f2e6ae984bf5c9fd
Author: Richard Hughes <richard hughsie com>
Date:   Thu Nov 21 16:46:12 2019 +0000

    Allow building on Windows
    
    Using a cross compiler we don't want to force specific linker flags.

 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 4baf899..5c7913f 100644
--- a/meson.build
+++ b/meson.build
@@ -20,7 +20,6 @@ darwin_versions = [lt_current.to_int() + 1, '@0@.@1@.0'.format(lt_current.to_int
 
 # get suported warning flags
 test_args = [
-  '-fstack-protector-strong',
   '-Waggregate-return',
   '-Wunused',
   '-Warray-bounds',
@@ -74,6 +73,10 @@ foreach arg: test_args
   endif
 endforeach
 
+if not meson.is_cross_build()
+  add_project_arguments('-fstack-protector-strong', language : 'c')
+endif
+
 # enable full RELRO where possible
 # FIXME: until https://github.com/mesonbuild/meson/issues/1140 is fixed
 global_link_args = []


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]