llvm-msvc icon indicating copy to clipboard operation
llvm-msvc copied to clipboard

custom implementation of MSVC NMAKE

Open wmjb opened this issue 1 year ago • 7 comments

any plans to build a replacement for msvc nmake ?

wmjb avatar Dec 20 '24 14:12 wmjb

No plans, CMake is great, and Make is great too. You can take a look at this project. https://github.com/gmh5225/make-4.2.1-msvc-build

gmh5225 avatar Dec 21 '24 05:12 gmh5225

just to give you a bit of background on the reason for the request. i've used llvm-mingw https://github.com/mstorsjo/llvm-mingw to cross compile llvm-msvc to armv7 -nvidia tegra arm32 microsoft surface rt 1/2. in order to have a msvc compatible compiler on windows 10 arm32, since microsoft never released vs for this platform. using codeblocks port as an ide, it can be configured for a vs 2010 profile, but this profile expects the use of nmake to build. using x86node (x86 emulator) microsoft nmake runs fine. using the windows 10 sdk files imported into the built llvm-msvc include/lib folders, using clang-cl and lld-link, llvm-msvc toolchain successfully compiles win32gui applications targeting the armv7 architecture using the msvc command line arguments that codeblocks ide sends it.

llvm-msvc has been very useful in this regard.

the ultimate goal here is to be able to produce msvc compatible libraries compiled on the armv7 hardware. that then can be used in vs to cross compile llvm. since llvm itself has a load of msvc related errors when cross compiling with the msvc toolchain for arm32, errors that clang doesn't have. - https://github.com/llvm/llvm-project/issues/49261

wmjb avatar Dec 21 '24 10:12 wmjb

I understand your needs, but this is relatively niche, and there are currently no plans for it. In this AI era, you can ask GPT, Claude, or Gemini to help you solve your problem.

I will not close this issue and will wait for other people or AI agent to fix it.

gmh5225 avatar Dec 21 '24 11:12 gmh5225

Can you just rename mingw32-make as nmake? Simple makefiles are generally compatible across different make implementations. What makes nmake makefiles special is that it usually assumes you use CMD instead of a POSIX shell like bash. mingw32-make also uses CMD so it should work.

driver1998 avatar Aug 05 '25 01:08 driver1998

Can you just rename mingw32-make as nmake? Simple makefiles are generally compatible across different make implementations. What makes nmake makefiles special is that it usually assumes you use CMD instead of a POSIX shell like bash. mingw32-make also uses CMD so it should work.

@wmjb would this work?

kristibektashi avatar Aug 10 '25 22:08 kristibektashi

Can you just rename mingw32-make as nmake? Simple makefiles are generally compatible across different make implementations. What makes nmake makefiles special is that it usually assumes you use CMD instead of a POSIX shell like bash. mingw32-make also uses CMD so it should work.

@wmjb would this work?

unfortunately no. the syntax for the compilers / linkers is completely different and parsing of ms project files isn't possible with mingw32-make.

wmjb avatar Aug 12 '25 10:08 wmjb

Then what you need is msbuild instead of nmake. msbuild is open source though.

driver1998 avatar Aug 12 '25 10:08 driver1998