lib/pkgforge/components/cflags.rb in pkgforge-0.24.1 vs lib/pkgforge/components/cflags.rb in pkgforge-0.25.0

- old
+ new

@@ -44,11 +44,11 @@ format: %w[-Wformat -Wformat-security -Werror=format-security], fortify: %w[-D_FORTIFY_SOURCE=2], implicit: %w[-Werror=implicit-function-declaration], lazybinding: %w[-Wl,-z,now], optimize: %w[-O2], - pic: %w[-fPIC -shared], + pic: %w[-fPIC], pie: %w[-fpie -Wl,-pie], relro: %w[-Wl,-z,relro], stackclash: %w[-fstack-clash-protection], stackprotector: %w[-fstack-protector-strong], strictoverflow: %w[-fno-strict-overflow], @@ -59,9 +59,15 @@ Contract Maybe[ArrayOf[String]] => nil def harden(list = []) harden_opts = ALL_HARDEN_OPTS.reject { |k, _| list.include? k.to_s } @forge.cflags += harden_opts.values.flatten nil + end + + STATIC_OPTS = %w[-static].freeze + Contract None => nil + def static + @forge.cflags += STATIC_OPTS.dup end end end end