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



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

    Allow building on Windows

 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]