CI for Windows.

This commit is contained in:
Alexander Myltsev 2024-02-10 01:17:15 +04:00
parent d955ac3b10
commit 70cd658ad0
2 changed files with 12 additions and 5 deletions

View File

@ -29,4 +29,10 @@ jobs:
run: brew install llvm x86_64-elf-binutils x86_64-elf-gcc run: brew install llvm x86_64-elf-binutils x86_64-elf-gcc
- name: LLVM build - name: LLVM build
run: make LLVM=on image.bin run: make LLVM=on image.bin
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: LLVM build
run: make LLVM=on image.bin

View File

@ -1,14 +1,14 @@
GDB=gdb GDB=gdb
OBJCOPY=objcopy OBJCOPY=objcopy
UNAME=uname
CAT=cat CAT=cat
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
UNAME=ver
CAT=type CAT=type
else
OS=$(shell uname -s)
endif endif
ifeq ($(shell $(UNAME) -s),Darwin) ifeq ($(OS),Darwin)
AS=x86_64-elf-as AS=x86_64-elf-as
LD=x86_64-elf-ld LD=x86_64-elf-ld
CC=x86_64-elf-gcc CC=x86_64-elf-gcc
@ -23,12 +23,13 @@ CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 &
ASMFLAGS = -m32 -ffreestanding -c -g ASMFLAGS = -m32 -ffreestanding -c -g
ifeq ($(LLVM),on) ifeq ($(LLVM),on)
#AS=llvm-as
ifeq ($(shell $(UNAME) -s),Darwin) ifeq ($(OS),Darwin)
LD=PATH=/usr/local/opt/llvm/bin:$(PATH) ld.lld LD=PATH=/usr/local/opt/llvm/bin:$(PATH) ld.lld
else else
LD=ld.lld LD=ld.lld
endif endif
CC=clang CC=clang
CFLAGS += -target elf-i386 CFLAGS += -target elf-i386
ASMFLAGS = -target elf-i386 -ffreestanding -c -g ASMFLAGS = -target elf-i386 -ffreestanding -c -g