<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 5, 2016, at 2:14 PM, James Y Knight <<a href="mailto:jyknight@google.com" class="">jyknight@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 3, 2016 at 1:25 PM, Steven Wu via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">"__LLVM, __cmdline" is used to store the clang command-line options.  There are<br class="">
few options that are not reflected in the bitcode that we would like to replay in<br class="">
the rebuild. For example, '-O0' option makes us run FastISel during rebuild.</blockquote><div class=""><br class=""></div><div class="">Without knowing more details of your implementation, I'd be concerned about how this might impact deterministic/reproducible builds.</div><div class=""><br class=""></div><div class="">Source paths are recorded in a number of places, but you can typically fix that by using -fdebug-prefix-map. But if the entire command-line including the -fdebug-prefix-map argument gets stored in the output too, then you still have a problem.</div></div></div></div>
</div></blockquote></div><div><br class=""></div><div>I don't think we need any path in the command line section. We only record the command-line options that will affect CodeGen. See my example in one of the preview reply:</div><div><blockquote type="cite" class="">$ clang -fembed-bitcode -O0 test.c -c -###<br class="">"clang" "-cc1"  (...lots of options...) "-o" "test.bc" "-x" "c" "test.c"   <--- First stage<br class="">"clang" "-cc1" "-triple" "x86_64-apple-macosx10.11.0" "-emit-obj" "-fembed-bitcode" "-O0" "-disable-llvm-optzns" "-o" "test.o" "-x" "ir" "test.bc"  <--- Second stage</blockquote>I can't think of any source path that can affect CodeGen. There should not be any paths other than the bitcode input path and binary output path exists in the second stage and they are excluded from the command line section as well. -fdebug-prefix-map is consumed by the front-end and prefixed paths are a part of the debug info in the metadata. You don't need to encode -fdebug-prefix-map in the bitcode section to reproduce the object file with the same debug info. Did that answer your concern?</div><div><br class=""></div><div>Thanks</div><div><br class=""></div><div>Steven</div></body></html>