Deterministic builds under Windows

前端 未结 4 690
北恋
北恋 2020-12-02 11:11

The ultimate goal is comparing 2 binaries built from exact same source in exact same environment and being able to tell that they indeed are functionally equivalent.

<
4条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 12:14

    Is there a way to either force compiler to use relative paths, or to fool it into thinking the path is not what it is?

    You have two ways to do this:

    1. Use the subst.exe command and map a drive letter to the build folder (this may not be reliable).
    2. If subst.exe doesn't work, then create shares for each of your build folders and use the "net use" command. This one almost certainly should work.

    In either case, you're going to map and reuse the same drive letter for a folder before you start a particular build, so that the path appears identical to the compiler.

提交回复
热议问题