# Disable manifest on Windows when using clang

**URL:** https://discourse.cmake.org/t/disable-manifest-on-windows-when-using-clang/15421
**Category:** Usage
**Created:** [December 23, 2025, 6:56pm UTC](https://discourse.cmake.org/t/disable-manifest-on-windows-when-using-clang/15421 "2025-12-23T18:56:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![TheNicker](https://discourse.cmake.org/user_avatar/discourse.cmake.org/thenicker/32/5961_2.png) [@TheNicker](https://discourse.cmake.org/u/TheNicker)
#### Post date: [December 23, 2025, 6:56pm UTC](https://discourse.cmake.org/t/disable-manifest-on-windows-when-using-clang/15421/1 "2025-12-23T18:56:05Z")

</div>

I’m using CMake 4.2.1 on Windows with clang (not clang-cl)  
In my project I embed a custom manifest, but `-Xlinker /MANIFEST:EMBED` is kept added to my link command resulting in duplicate manifest.  
I was trying to replace it or to override it with `-Xinker /MANIFEST:NO,` but it is always gets prepended and not appended

Seems like it’s coming from `CMake\share\cmake-4.2\Modules\Platform\Windows-Clang.cmake`  
`at line 93.`

Notice the sinister `/MANIFEST:EMBED`

```auto
set(CMAKE_${lang}_LINK_EXECUTABLE

    "<CMAKE_${lang}_COMPILER> -nostartfiles -nostdlib <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Xlinker /MANIFEST:EMBED -Xlinker /implib:<TARGET_IMPLIB> -Xlinker /pdb:<TARGET_PDB> -Xlinker /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES> <MANIFESTS>")

```

Couldn’t find a way to override it.  
If someone knows how to override it, without of course changing CMake itself, that would be helpful.

No issues with clang-cl

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 9, 2026, 5:31am UTC](https://discourse.cmake.org/t/disable-manifest-on-windows-when-using-clang/15421/2 "2026-02-09T05:31:05Z")

</div>

It is baked into the command line CMake uses for linking on `Windows-Clang`. I don’t see any custom flag slots to override it afterwords unless you add it as a “link library”. Might be worth a feature request?
