2025-01-02 14:33 UTC+0100 Aleksander Czajczynski (hb fki.pl)

* config/global.mk
  * config/win/clang-noauto.mk
  * config/win/clang.mk
    * supplemented config for Windows clang cross compilers
      distributed in multilib fashion, like Martin Storsjo's:
      https://github.com/mstorsjo/llvm-mingw

    + HB_CCPREFIX= support for clang on Windows, you can build
      ARM64 Harbour from AMD64 hosts using mentioned toolchain:
      set PATH=C:\llvm-mingw\bin;%PATH%
      set HB_COMPILER=clang
      win-make (build for your host first)
      set HB_CCPREFIX=aarch64-w64-mingw32-
      set HB_HOST_BIN=<HarbourPath>\bin\win\clang\ (if not autodetected)
      win-make

    ; cross compiling from Unix hosts is not yet tested, but
      looks very close to be possible

    ! fixed typo's

  * utils/hbmk2/hbmk2.prg
    * changed llvm-ar call to also respect HB_CCPREFIX
This commit is contained in:
Aleksander Czajczynski
2025-01-02 14:32:10 +01:00
parent a23ea4904f
commit 21ea321f0a
5 changed files with 51 additions and 18 deletions

View File

@@ -135,7 +135,7 @@
5. If HB_COMPILER is not set,
use the highest one on the priority list.
NOTES: - Priority list: HB_CCPATH, PATH, embedded.
- Priority list: mingw, msvc, bcc, watcom, pocc, xcc
- Priority list: mingw, clang, msvc, bcc, watcom, pocc, xcc
- Compilers of native CPU target have higher priority. (extra)
On x86_64 Windows: msvc64, msvc, msvcia64, mingw64, mingw, ...
On x86 Windows: msvc, msvc64, msvcia64, mingw, mingw64, ...
@@ -4458,7 +4458,7 @@ STATIC FUNCTION __hbmk( aArgs, nArgTarget, nLevel, /* @ */ lPause, /* @ */ lExit
ENDIF
cImpLibExt := cLibLibExt
IF hbmk[ _HBMK_cCOMP ] == "clang"
cBin_Lib := "llvm-ar.exe"
cBin_Lib := hbmk[ _HBMK_cCCPREFIX ] + "llvm-ar" + hbmk[ _HBMK_cCCEXT ]
ELSEIF hbmk[ _HBMK_cCOMP ] == "tcc"
cBin_Lib := "tiny_libmaker.exe"
ELSE