Skip to content

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Aug 10, 2024

This reenables ThinLTO on x86_64-pc-windows-msvc.

try-job: dist-x86_64-msvc

@rustbot
Copy link
Collaborator

rustbot commented Aug 10, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 10, 2024
@jieyouxu
Copy link
Member

FYI @rust-lang/infra

@lqd
Copy link
Member

lqd commented Aug 11, 2024

I don't think we're in a situation where we can yet have a definite yes/no answer for this PR yet.

Marking as blocked on #122790. The discussions and underlying issues there shouldn't be split amongst PRs.

@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 11, 2024
@bors
Copy link
Collaborator

bors commented Sep 20, 2024

☔ The latest upstream changes (presumably #130506) made this pull request unmergeable. Please resolve the merge conflicts.

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 11, 2025

@rustbot ready

This is no longer blocked, at least not on my previous PR.

Are the binaries built by dist jobs properly tested now?
Are there any other knowns issues with ThinLTO on Windows?

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Mar 11, 2025
@Kobzol
Copy link
Member

Kobzol commented Mar 11, 2025

They are tested, not sure if properly :) Last time we tried it, one test was still miscompiled, we could try again.

  • comment out DIST_TRY_BUILD insrc/ci/github-actions/jobs.yml
  • add a line try-job: dist-x86_64-msvc to the PR description
  • run a try build

@jieyouxu
Copy link
Member

jieyouxu commented Mar 11, 2025

They are tested, not sure if properly :)

As far as I know, Windows dist artifacts are not tested at all (note that dist artifacts are not necessarily equivalent to test job artifacts; and usually they are not equivalent due to configuration differences). We do have Windows test jobs that run the full test suites but they aren't testing the dist artifacts.

EDIT: x86_64-pc-windows-msvc goes through opt-dist but not the other i686-pc-windows-msvc apparently.

Recently we broke i686-pc-windows-gnu rustc binaries in a way that caused rustc binary to completely not work (rustc -vV failed) but no tests caught it.

@lqd
Copy link
Member

lqd commented Mar 11, 2025

As far as I know, Windows dist artifacts are not tested at all

We do test dist x64 msvc artifacts in opt-dist.

@jieyouxu
Copy link
Member

jieyouxu commented Mar 11, 2025

Huh. I must be thinking of x86_64 windows-gnu or maybe the 32 bit windows-msvc target?

EDIT: in any case you're right:

https://github.com/rust-lang/rust/blob/master/src%2Fci%2Fgithub-actions%2Fjobs.yml#L584

@Kobzol
Copy link
Member

Kobzol commented Mar 13, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
Perform ThinLTO on x86_64-pc-windows-msvc dist builder

This reenables ThinLTO on x86_64-pc-windows-msvc.

Depends on rust-lang#122790

try-job: dist-x86_64-msvc
@bors
Copy link
Collaborator

bors commented Mar 13, 2025

⌛ Trying commit 3d3aba0 with merge b9d7ae0...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Mar 13, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 13, 2025
@Kobzol
Copy link
Member

Kobzol commented Mar 13, 2025

@bors try

@bors
Copy link
Collaborator

bors commented Mar 13, 2025

⌛ Trying commit a832199 with merge 359c9af...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
Perform ThinLTO on x86_64-pc-windows-msvc dist builder

This reenables ThinLTO on x86_64-pc-windows-msvc.

Depends on rust-lang#122790

try-job: dist-x86_64-msvc
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Mar 13, 2025

💔 Test failed - checks-actions

@bors
Copy link
Collaborator

bors commented Mar 18, 2025

☔ The latest upstream changes (presumably #138630) made this pull request unmergeable. Please resolve the merge conflicts.

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 23, 2025

The error looks like memory unsafety, possibly due to a miscompilation.

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 23, 2025
Perform ThinLTO on x86_64-pc-windows-msvc dist builder

This reenables ThinLTO on x86_64-pc-windows-msvc.

try-job: dist-x86_64-msvc
@bors
Copy link
Collaborator

bors commented Apr 23, 2025

⌛ Trying commit 4c4710f with merge d35bc80...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Apr 23, 2025

💔 Test failed - checks-actions

@bors
Copy link
Collaborator

bors commented Aug 13, 2025

☔ The latest upstream changes (presumably #145295) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot rustbot added the A-CI Area: Our Github Actions CI label Sep 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 25, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@Zoxc
Copy link
Contributor Author

Zoxc commented Sep 25, 2025

@bors try

rust-bors bot added a commit that referenced this pull request Sep 25, 2025
Perform ThinLTO on x86_64-pc-windows-msvc dist builder

try-job: dist-x86_64-msvc
@rust-bors

This comment has been minimized.

@rust-log-analyzer
Copy link
Collaborator

The job dist-x86_64-msvc failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] mdbook test:false 19.973
   Compiling error_index_generator v0.0.0 (C:\a\rust\rust\src\tools\error_index_generator)
error: linking with `link.exe` failed: exit code: 1120
  |
  = note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.44.35207\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "<88 object files omitted>" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN/{libparking_lot_core-a77da64e61b1ce37,libgetrandom-913f35ddcb78dec6,libwindows_sys-b8ec8c92a4a2a60e}.rlib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\rustc_driver-c894da437a6a5437.dll.lib" "<sysroot>\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib/libcompiler_builtins-*.rlib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "winspool.lib" "psapi.lib" "shell32.lib" "ole32.lib" "uuid.lib" "advapi32.lib" "ws2_32.lib" "ntdll.lib" "bcrypt.lib" "advapi32.lib" "kernel32.lib" "advapi32.lib" "ole32.lib" "oleaut32.lib" "legacy_stdio_definitions.lib" "kernel32.lib" "kernel32.lib" "kernel32.lib" "kernel32.lib" "ntdll.lib" "userenv.lib" "ws2_32.lib" "dbghelp.lib" "/defaultlib:libcmt" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\advapi32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-errorhandling-l1-1-3.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-file-fromapp-l1-1-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-handle-l1-1-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-ioring-l1-1-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-libraryloader-l2-1-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-memory-l1-1-3.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-memory-l1-1-4.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-memory-l1-1-5.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-memory-l1-1-6.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-memory-l1-1-7.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-memory-l1-1-8.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-synch-l1-2-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-sysinfo-l1-2-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-sysinfo-l1-2-3.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-sysinfo-l1-2-4.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-sysinfo-l1-2-6.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-util-l1-1-1.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-winrt-error-l1-1-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-winrt-l1-1-0.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-core-wow64-l1-1-1.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\api-ms-win-security-base-l1-2-2.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\avrt.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\bcp47mrm.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\bcryptprimitives.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\clfsw32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\dbghelp.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\elscore.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\gdi32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\icu.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\icuin.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\icuuc.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\imagehlp.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\kernel32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\ktmw32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\netapi32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\normaliz.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\ntdll.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\ntdllk.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\ole32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\oleacc.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\oleaut32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\psapi.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\rtworkq.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\txfw32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\user32.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\usp10.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\version.dll_imports_indirect.lib" "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\wofutil.dll_imports_indirect.lib" "/NXCOMPAT" "/OUT:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\stage2-tools\\x86_64-pc-windows-msvc\\release\\deps\\error_index_generator-550bfaf2f7306017.exe" "/OPT:REF,ICF" "/DEBUG" "/PDBALTPATH:%_PDB%" "/NATVIS:C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\error_index_generator-0.natvis" "/NATVIS:C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\error_index_generator-1.natvis" "/NATVIS:C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\rustcIKbENN\\error_index_generator-2.natvis" "-LIBPATH:C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\llvm\\lib"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: error_index_generator-550bfaf2f7306017.aho_corasick-85431bf8a853317c.aho_corasick.5868a3e0b4cd09bd-cgu.0.rcgu.o.rcgu.o : error LNK2019: unresolved external symbol _ZN10std_detect6detect5cache5CACHE17hb7a95455aed0dbadE referenced in function _RNvMs1_NtNtCs7AB3zN1BWZ5_12aho_corasick4util9prefilterNtB5_7Builder5build␍
          error_index_generator-550bfaf2f7306017.memchr-0bba43e9d06b82d1.memchr.f61ccd07f6610227-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN10std_detect6detect5cache5CACHE17hb7a95455aed0dbadE␍
          error_index_generator-550bfaf2f7306017.regex_automata-6ac1f92c2d173f4c.regex_automata.1de50e4ee95e88c3-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN10std_detect6detect5cache5CACHE17hb7a95455aed0dbadE␍
          error_index_generator-550bfaf2f7306017.mdbook-dd5577b2ad5d4801.mdbook.964511ed245f255d-cgu.0.rcgu.o.rcgu.o : error LNK2019: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE referenced in function _RNvMNtCsl1DTQE1XdZ7_14pulldown_cmark4htmlINtB2_10HtmlWriterINtNtNtCs8ewEIZ7NfPM_5alloc3vec9into_iter8IntoIterNtB4_5EventEQNtNtB12_6string6StringE3runCscTSISXTLhJp_6mdbook␍
          error_index_generator-550bfaf2f7306017.pulldown_cmark-ddc56e0b89aa729f.pulldown_cmark.f4e8a43af5baeebb-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE␍
          error_index_generator-550bfaf2f7306017.regex_syntax-769a0a06dedd2545.regex_syntax.5df66a000aa2fd82-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE␍
          error_index_generator-550bfaf2f7306017.ammonia-984b439b2ecdbf54.ammonia.c3b8846cc43c4564-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE␍
          error_index_generator-550bfaf2f7306017.anyhow-8772a186eba5fb55.anyhow.2b4127144012d2c4-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE␍
          error_index_generator-550bfaf2f7306017.elasticlunr-8fa1cc7ead7a6eb3.elasticlunr.715d1759e3006f07-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE␍
          error_index_generator-550bfaf2f7306017.handlebars-6c3ea0a37037e8fb.handlebars.ed3d71f1cd2b4a61-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN4core7unicode12unicode_data11white_space14WHITESPACE_MAP17h02914863d8b4faceE␍
          error_index_generator-550bfaf2f7306017.elasticlunr-8fa1cc7ead7a6eb3.elasticlunr.715d1759e3006f07-cgu.0.rcgu.o.rcgu.o : error LNK2019: unresolved external symbol _ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17hf82d1bd224240fbdE referenced in function _RINvNtCsj9VJGKtLQuu_4core3ptr13drop_in_placeINtNtNtNtCsfOKht8Wqmg5_3std4sync6poison5mutex10MutexGuardINtNtCs8ewEIZ7NfPM_5alloc3vec3VecINtNtB1G_5boxed3BoxNtNtNtCs2z804lMaT7z_14regex_automata4meta5regex5CacheEEEECs9JqMxyOEgRf_11elasticlunr␍
          error_index_generator-550bfaf2f7306017.mdbook-dd5577b2ad5d4801.mdbook.964511ed245f255d-cgu.0.rcgu.o.rcgu.o : error LNK2001: unresolved external symbol _ZN3std9panicking11panic_count18GLOBAL_PANIC_COUNT17hf82d1bd224240fbdE␍
          C:\a\rust\rust\build\x86_64-pc-windows-msvc\stage2-tools\x86_64-pc-windows-msvc\release\deps\error_index_generator-550bfaf2f7306017.exe : fatal error LNK1120: 3 unresolved externals␍
          

[RUSTC-TIMING] error_index_generator test:false 16.404
error: could not compile `error_index_generator` (bin "error_index_generator") due to 1 previous error

@rust-bors
Copy link

rust-bors bot commented Sep 25, 2025

💔 Test for 74ab0d8 failed: CI. Failed jobs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants