Pass -Brepro ldflag to Windows builds

The default build-id is generated using timestamp. Pass -Brepro to
avoid using timestamp for deterministic build.

Bug: 153462962
Test: build fastboot.exe twice, got same shasum
Change-Id: I38fe993eec23c60bfcf1b76188774bfe06839fa4
This commit is contained in:
Yi Kong 2020-04-09 00:11:53 +08:00
parent b54015fa54
commit a3c22e7ee2
1 changed files with 4 additions and 1 deletions

View File

@ -58,8 +58,11 @@ var (
"-Wl,--dynamicbase",
"-Wl,--nxcompat",
}
windowsLldflags = []string{
"-Wl,--Xlink=-Brepro", // Enable deterministic build
}
windowsClangLdflags = append(ClangFilterUnknownCflags(windowsLdflags), []string{}...)
windowsClangLldflags = ClangFilterUnknownLldflags(windowsClangLdflags)
windowsClangLldflags = append(ClangFilterUnknownLldflags(windowsClangLdflags), windowsLldflags...)
windowsX86Cflags = []string{
"-m32",