RFR: 8330341: Wrap call to MT in ExecuteWithLog

Magnus Ihse Bursie ihse at openjdk.org
Sat Sep 6 09:15:47 UTC 2025


On Fri, 5 Sep 2025 17:08:30 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

> We should wrap the call to `mt` in `ExecuteWithLog`. I tried to do this earlier but ran into problems with the tricky command line. The solution was to use `$$(COMMA)` (and `$$(HASH)`); I'm not sure why I did not see this before.
> 
> I also notet that there is an actual bug in the MT command line -- the trailing `;#1` is not protected from the shell, so the command line will end after `-outputresource:$$@`, and then a new command -- the comment `#1` which does nothing, will be executed. This works out anyway since if you leave out the resource identifier index the value of `CREATEPROCESS_MANIFEST_RESOURCE` will be used by default, and that happens to be 1.
>  (See https://learn.microsoft.com/en-us/windows/win32/sbscs/mt-exe)

I have done a comparison build on the Oracle CI and confirmed that the build output is identical with and without this patch.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27124#issuecomment-3261667149


More information about the build-dev mailing list