Advertisement
cakemaker

msvc linker args for `#pragma comment(linker, "/arg")`

May 24th, 2025
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | Cryptocurrency | 0 0
  1. List of all msvc linker arguments allowed as `#pragma comment(linker, "/arg")`.
  2. It's mostly subset of all linker arguments (allowed in command-line switches).
  3. Source: hostx64\x64\link.exe 14.44.35207 (vs2022).
  4. Args processing performed in `ProcessLinkerSwitches`, and arg3 is `DirectiveIsFromObjectFile` (i.e. from pragma).
  5.  
  6. align
  7. alternatename
  8. arm64xcrossdebug
  9. arm64xfastforward
  10. arm64xsameaddress
  11. arm64xfunctionpadminx64
  12. assemblymodule
  13. base
  14. clrloaderoptimization
  15. clrnetcore
  16. clrthreadattribute
  17. coffsecttopdbstrm
  18. defaultlib
  19. didatownsection
  20. disallowlib
  21. dll
  22. dll:system
  23. editandcontinue
  24. encpadsize
  25. entry
  26. export
  27. failifmismatch // odd: only allowed as pragma
  28. guardsym
  29. heap
  30. hotpatchcompatible
  31. hybriddefupgrade
  32. icfsection
  33. importcalloptimization
  34. include
  35. includecoffsection
  36. incremental
  37. inferasanlibs
  38. manifestdependency
  39. merge
  40. nocomentry
  41. nodefaultlib
  42. nod
  43. nofunctionpadsection
  44. noilinkcoffgrppad
  45. out
  46. re
  47. section
  48. stack
  49. subsystem
  50. subsystemversion
  51. throwingnew // odd: only allowed as pragma, but ignored? See /Zc:throwingNew instead
  52. version
  53. wholearchive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement