hard to embed custom manifest on windows
I want to use a custom manifest file on windows to enable long filename support. I tried several ghc options to find a way to do it, and it does not seem easily possible to do this.
First I thought, let's use -fno-gen-manifest, and since ghc generates foo.exe.manifest when building foo.hs, I'll provide a file with that name and it'll pick it up. But it seems that -fno-gen-manifest implies -fno-embed-manifest, so it didn't run windres, and this didn't work.
Then I tried using -optwindres, hoping to pass windres -i foo.rc, and make that file point to my custom manifest. But, despite being documented as options that are passed to windres, -optwindres actually adds to the end of the windres --preprocessor option, so this caused it to run windres --preprocessor "gcc.exe ... -i foo.rc"
The only remaining option seems to be to use -pgmwindres with a wrapper program that runs windres with the options I want. It seemed easier to file a ghc bug at this point..
I feel that the best fix would be either to still run windres when -fno-gen-manifest is used, or to add a new option like -fuse-custom-manifest-file=filename
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |