diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 11109846..b40560f6 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -45,6 +45,10 @@ jobs: - name: Debug PATH if: runner.os == 'Windows' run: | + where gcc + gcc --version + where clang + clang --versino & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" echo $env:PATH where cl diff --git a/extensions/Makefile b/extensions/Makefile index b4995917..1290cd1e 100644 --- a/extensions/Makefile +++ b/extensions/Makefile @@ -1,11 +1,12 @@ .PHONY: all headers -OUTPUT := - ifeq ($(OS),Windows_NT) OUTPUT = lib/noattach.dll + CCFLAGS = -shared + CC = clang else UNAME := $(shell uname) + CCFLAGS = -fPIC -Os -shared ifeq ($(UNAME),Darwin) ifeq ($(shell uname -m),arm64) OUTPUT = lib/arm/noattach.dylib @@ -32,9 +33,5 @@ headers: cp sqlite-amalgamation-3470200/*.h . $(OUTPUT): noattach.c -ifeq ($(OS),Windows_NT) - cl /LD /Fe:$(OUTPUT) $< -else # We don't link against libsqlite3 since PHP statically links its own libsqlite3. - $(CC) -fPIC -Os -shared -o $@ $< -endif + $(CC) $(CCFLAGS) -o $@ $<