[vlc-commits] [Git][videolan/vlc][master] 2 commits: meson: add -fdata-sections/-ffunction-sections when split_sections is enabled

Steve Lhomme (@robUx4) gitlab at videolan.org
Sun Oct 11 08:13:23 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b9d72e69 by Steve Lhomme at 2026-10-11T06:52:18+00:00
meson: add -fdata-sections/-ffunction-sections when split_sections is enabled

Missing from !10380

- - - - -
37f92401 by Steve Lhomme at 2026-10-11T06:52:18+00:00
meson: add some compilation flags when optimization is enabled

As in autotools.

- - - - -


1 changed file:

- meson.build


Changes:

=====================================
meson.build
=====================================
@@ -871,6 +871,20 @@ if host_system != 'os/2'
         language: ['c'])
 endif
 
+if get_option('optimization') != '0'
+    add_project_arguments(cc.get_supported_arguments([
+        '-fno-math-errno', '-funsafe-math-optimizations',
+        '-fno-rounding-math', '-fno-signaling-nans', '-fcx-limited-range'
+    ]), language: ['c', 'cpp'])
+    if cc.has_argument('-funroll-loops')
+        add_project_arguments('-funroll-loops', language: ['c', 'objc'])
+    endif
+    if cpp.has_argument('-funroll-loops')
+        add_project_arguments('-funroll-loops', language: ['cpp'])
+    endif
+endif
+
+
 # Stack smashing protection (default enabled for optimized builds)
 if (get_option('ssp')
     .disable_auto_if(get_option('optimization') == '0')
@@ -913,6 +927,10 @@ if cc.has_link_argument('-Wl,--gc-sections')
 elif cc.has_link_argument('-Wl,-dead_strip')
     gc_sections_linkargs += '-Wl,-dead_strip'
 endif
+
+add_project_arguments(cc.get_supported_arguments([
+    '-fdata-sections', '-ffunction-sections'
+]), language: ['c', 'cpp'])
 endif
 
 # Check for struct sockaddr_storage type



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8d7664469038be3cb06cf3c0464d348a76a214df...37f92401e5c543e9668d63ec65f5544e595e0c16

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8d7664469038be3cb06cf3c0464d348a76a214df...37f92401e5c543e9668d63ec65f5544e595e0c16
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list