OS X's dyld embarrassingly drops some environment variables it depends on as shown by the dyld-env-drop-test.sh
script next to this note.
This means you cannot wrap your binaries with shims that fixup environment variables, etc. and hope them to inherit any DYLD_*
environment set from another layer of wrapper script.
You must call the binary executables immediately after setting up dyld.
$ ./dyld-env-drop-test.sh
does work: some_random_env_var='foo'
does work: another_random_name='foo'
does work: PATH='foo'
does work: USER='foo'