Skip to content

Commit 26539a0

Browse files
committed
Add mbig-obj flag to allow cross-compiling libexpr to mingw32
1 parent 177a067 commit 26539a0

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# libexpr's primops creates a large object
2+
# Without the following flag, we'll get errors when cross-compiling to mingw32:
3+
# Fatal error: can't write 66 bytes to section .text of src/libexpr/libnixexpr.dll.p/primops.cc.obj: 'file too big'
4+
add_project_arguments([ '-Wa,-mbig-obj' ], language: 'cpp')

src/libexpr/meson.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ deps_public_maybe_subproject = [
2424
dependency('nix-fetchers'),
2525
]
2626
subdir('nix-meson-build-support/subprojects')
27+
subdir('nix-meson-build-support/big-objs')
2728

2829
boost = dependency(
2930
'boost',

0 commit comments

Comments
 (0)