diff --git a/.github/workflows/alpha.yml b/.github/workflows/alpha.yml index 0cdc07263..390716ce6 100644 --- a/.github/workflows/alpha.yml +++ b/.github/workflows/alpha.yml @@ -183,13 +183,36 @@ jobs: name: zen.source.tar.gz path: ./zen.source.tar.gz + windows-step-1: + name: Windows build step 1 (PGO build) + uses: ./.github/workflows/windows-alpha-build.yml + needs: [build-data] + permissions: + contents: write + secrets: inherit + with: + build-version: ${{ needs.build-data.outputs.version }} + generate-gpo: true + profile-data-path-archive: zen-windows-x86_64-profile-data-and-jarlog.zip + + windows-step-2: + name: Windows build step 2 (Generate profile data) + uses: ./.github/workflows/windows-profile-build.yml + permissions: + contents: write + secrets: inherit + needs: [windows-step-1, build-data] + with: + build-version: ${{ needs.build-data.outputs.version }} + profile-data-path-archive: zen.win64-pgo-stage-1.zip + windows-step-3: name: Windows build step 3 (build with profile data) uses: ./.github/workflows/windows-alpha-build.yml permissions: contents: write secrets: inherit - needs: [build-data] + needs: [build-data, windows-step-2] with: build-version: ${{ needs.build-data.outputs.version }} generate-gpo: false diff --git a/configs/windows/mozconfig b/configs/windows/mozconfig index 54a1fb638..3101401b0 100644 --- a/configs/windows/mozconfig +++ b/configs/windows/mozconfig @@ -52,4 +52,15 @@ fi export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" export VERBOSE=1 +if test "$ZEN_CROSS_COMPILING"; then + if test "$ZEN_GA_GENERATE_PROFILE"; then + export CXXFLAGS="$CXXFLAGS -fprofile-generate -mllvm -enable-name-compression=false -mllvm -pgo-temporal-instrumentation -fprofile-update=atomic" + mk_add_options "export MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES=0" + ac_add_options --enable-profile-generate=cross + else + ac_add_options --enable-profile-use=cross + ac_add_options --with-pgo-profile-path=$(echo ~)/artifact/merged.profdata + ac_add_options --with-pgo-jarlog=$(echo ~)/artifact/en-US.log + fi +fi