Skip to content

Commit d364bfa

Browse files
mshinwellpoechsel
authored andcommitted
flambda-backend: Local patch against upstream: enable function sections in the Dune build
1 parent 886b800 commit d364bfa

File tree

8 files changed

+9
-0
lines changed

8 files changed

+9
-0
lines changed

dune

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
-w -67
4040
; remove -w -67 by adding the camlinternalMenhirLib hack like the Makefile
4141
))
42+
(ocamlopt_flags (:standard -function-sections))
4243
(library_flags -linkall)
4344
(libraries stdlib)
4445
(modules_without_implementation
@@ -89,6 +90,7 @@
8990
-nostdlib -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66
9091
-warn-error A -bin-annot -safe-string -strict-formats
9192
))
93+
(ocamlopt_flags (:standard -function-sections))
9294
(libraries stdlib ocamlcommon)
9395
(modules
9496
;; bytecomp/

lex/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
(wrapped false)
1717
(modes byte native)
1818
(flags (:standard -principal -nostdlib))
19+
(ocamlopt_flags (:standard -function-sections))
1920
(libraries stdlib)
2021
(modules
2122
common

otherlibs/bigarray/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
-nostdlib -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66
2121
-warn-error A -bin-annot -safe-string -strict-formats
2222
))
23+
(ocamlopt_flags (:standard -function-sections))
2324
(library_flags (:standard -linkall))
2425
(libraries stdlib))
2526

otherlibs/dynlink/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
-nostdlib -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48
2121
-warn-error A -bin-annot -safe-string -strict-formats
2222
))
23+
(ocamlopt_flags (:standard -function-sections))
2324
(modules
2425
binutils
2526
local_store

otherlibs/str/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
-nostdlib -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48-66
2121
-warn-error A -bin-annot -safe-string -strict-formats
2222
))
23+
(ocamlopt_flags (:standard -function-sections))
2324
(library_flags (:standard -linkall))
2425
(libraries stdlib)
2526
(foreign_stubs (language c) (names strstubs)))

otherlibs/systhreads/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
mutex
2323
thread)
2424
(flags -w +33..39 -warn-error A -g -bin-annot -safe-string)
25+
(ocamlopt_flags (:standard -function-sections))
2526
(libraries stdlib unix)
2627
(library_flags -linkall)
2728
(c_library_flags -lpthread)

otherlibs/unix/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
-nostdlib -absname -w +a-4-9-41-42-44-45-48 -warn-error A -bin-annot
2121
-g -safe-string -strict-sequence -strict-formats
2222
))
23+
(ocamlopt_flags (:standard -function-sections))
2324
(library_flags (:standard -linkall))
2425
(libraries stdlib)
2526
(foreign_stubs (language c) (names

stdlib/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
-g -warn-error A -bin-annot -nostdlib
2626
-safe-string -strict-formats
2727
))
28+
(ocamlopt_flags (:standard -function-sections))
2829
(preprocess
2930
(per_module
3031
((action

0 commit comments

Comments
 (0)