add SOURCE_DIR environment variable in pre-link subprocess