History

meson: add more common options (no trapping math, GC sections, etc)

Sigrid Solveig Haflínudóttir committed 3 months ago

Commit 7abb3521 parent 8b852451 file · +18 −0Browse files

Unified · Split

meson.build+18−0
@@ -21,6 +21,24 @@ sys = host_machine.system() · 20 unmodified lines
2121 cc = meson.get_compiler('c')
2222 hardened = false
2323
24+add_project_arguments(
25+ cc.get_supported_arguments(
26+ '-fdata-sections',
27+ '-ffunction-sections',
28+ '-fno-common',
29+ '-fno-math-errno',
30+ '-fno-trapping-math',
31+ ),
32+ language: 'c',
33+)
34+
35+add_project_link_arguments(
36+ cc.get_supported_link_arguments(
37+ '-Wl,--gc-sections',
38+ ),
39+ language: 'c',
40+)
41+
2442 if get_option('hardened').enabled() and sys != 'dos' and sys != 'macos'
2543 hardened = true
2644 add_project_arguments(

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t