Skip to content

Commit 9e4d842

Browse files
committed
depends: make osx output deterministic
ld64 is threaded, and uses a worker for each CPU to parse input files. But there's a bug in the parser causing dependencies to be calculated differently based on which files have already been parsed. As a result, builders with more CPUs are more likely to see non-determinism. This looks to have been fixed in a newer version of ld64, so just disable threading for now. There's no noticible slowdown.
1 parent 7e2a221 commit 9e4d842

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

depends/packages/native_cctools.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ $(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++
3838
endef
3939

4040
define $(package)_preprocess_cmds
41-
cd $($(package)_build_subdir); ./autogen.sh
41+
cd $($(package)_build_subdir); ./autogen.sh && \
42+
sed -i.old "/define HAVE_PTHREADS/d" ld64/src/ld/InputFiles.h
4243
endef
4344

4445
define $(package)_config_cmds

0 commit comments

Comments
 (0)