{"id":29134,"date":"2020-06-03T15:58:56","date_gmt":"2020-06-03T19:58:56","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=29134"},"modified":"2025-07-08T21:57:10","modified_gmt":"2025-07-09T01:57:10","slug":"apples-linker-deterministic-builds","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2020\/06\/03\/apples-linker-deterministic-builds\/","title":{"rendered":"Apple&rsquo;s Linker &#038; Deterministic Builds"},"content":{"rendered":"<p><a href=\"https:\/\/milen.me\/writings\/apple-linker-ld64-deterministic-builds-oso-prefix\/\">Milen Dzhumerov<\/a>:<\/p>\n<blockquote cite=\"https:\/\/milen.me\/writings\/apple-linker-ld64-deterministic-builds-oso-prefix\/\"><ul><li><a href=\"http:\/\/blog.llvm.org\/2019\/11\/deterministic-builds-with-clang-and-lld.html\">Universal deterministic builds<\/a> require that all paths in artifacts <em>must<\/em> be repo checkout independent.<\/li><li>On Apple platforms, the linker will insert <em>absolute<\/em> paths to object files in executables.<\/li><li>In Xcode 11, Apple added a new linker option, <code>-oso_prefix<\/code>, that can relativise OSO absolute paths.<\/li><li>Another source of non-determinism in object files are the OSO timestamp entries.<\/li><\/ul><\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Milen Dzhumerov: Universal deterministic builds require that all paths in artifacts must be repo checkout independent.On Apple platforms, the linker will insert absolute paths to object files in executables.In Xcode 11, Apple added a new linker option, -oso_prefix, that can relativise OSO absolute paths.Another source of non-determinism in object files are the OSO timestamp entries.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2020-06-03T19:58:59Z","apple_news_api_id":"19b7f046-b275-4af9-b7d7-e6ae6eee5d67","apple_news_api_modified_at":"2025-07-09T01:57:13Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AGbfwRrJ1Svm31-aubu5dZw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[75,30,2792,1666,71,226],"class_list":["post-29134","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-developertool","tag-mac","tag-mach-o","tag-macos-10-15","tag-programming","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/29134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=29134"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/29134\/revisions"}],"predecessor-version":[{"id":29135,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/29134\/revisions\/29135"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=29134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=29134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=29134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}