Skip to content

Commit

Permalink
Only enable big-obj on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
puffnfresh committed Feb 1, 2025
1 parent 26539a0 commit f62a287
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nix-meson-build-support/big-objs/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# libexpr's primops creates a large object
# Without the following flag, we'll get errors when cross-compiling to mingw32:
# Fatal error: can't write 66 bytes to section .text of src/libexpr/libnixexpr.dll.p/primops.cc.obj: 'file too big'
add_project_arguments([ '-Wa,-mbig-obj' ], language: 'cpp')
if host_machine.system() == 'windows'
# libexpr's primops creates a large object
# Without the following flag, we'll get errors when cross-compiling to mingw32:
# Fatal error: can't write 66 bytes to section .text of src/libexpr/libnixexpr.dll.p/primops.cc.obj: 'file too big'
add_project_arguments([ '-Wa,-mbig-obj' ], language: 'cpp')
endif

0 comments on commit f62a287

Please sign in to comment.