Skip to content

Commit

Permalink
Merge branch 'feature/compiler-pcre2' into ci/update-distribution-scr…
Browse files Browse the repository at this point in the history
…ipts
  • Loading branch information
straight-shoota committed Feb 24, 2023
2 parents 6005a1b + d74ecfd commit 6aa4e2f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Build Crystal
uses: docker://jhass/crystal:1.0.0-alpine-build
with:
args: make crystal
args: make crystal PCRE1=true
- name: Upload Crystal executable
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Build Crystal
uses: docker://jhass/crystal:1.0.0-build
with:
args: make crystal
args: make crystal PCRE1=true
- name: Upload Crystal executable
uses: actions/upload-artifact@v3
with:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
crystal_bootstrap_version: [1.2.2, 1.3.2, 1.4.1, 1.5.1, 1.6.2, 1.7.2]
crystal_bootstrap_version: [1.2.2, 1.3.2, 1.4.1, 1.5.1, 1.6.2]
env: "PCRE1=true"
include:
# libffi is only available starting from the 1.2.2 build images
- crystal_bootstrap_version: 1.0.0
flags: -Dwithout_ffi
- crystal_bootstrap_version: 1.1.1
flags: -Dwithout_ffi
- crystal_bootstrap_version: 1.7.2
env: ""
steps:
- name: Download Crystal source
uses: actions/checkout@v3
Expand All @@ -33,7 +36,7 @@ jobs:
run: bin/ci prepare_build

- name: Test
run: FLAGS=${{ matrix.flags }} bin/ci build
run: FLAGS=${{ matrix.flags }} ${{ matrix.env}} bin/ci build

x86_64-musl-test:
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
make deps
- name: Cross-compile Crystal
run: |
LLVM_TARGETS=X86 bin/crystal build --cross-compile --target x86_64-pc-windows-msvc src/compiler/crystal.cr -Dwithout_playground -Dwithout_iconv -Dwithout_interpreter -Duse_pcre
LLVM_TARGETS=X86 bin/crystal build --cross-compile --target x86_64-pc-windows-msvc src/compiler/crystal.cr -Dwithout_playground -Dwithout_iconv -Dwithout_interpreter -Duse_pcre2
- name: Upload Crystal object file
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
run: make -f Makefile.win deps
- name: Link Crystal executable
run: |
Invoke-Expression "cl crystal.obj /Fecrystal src\llvm\ext\llvm_ext.obj $(llvm\bin\llvm-config.exe --libs) libs\pcre.lib libs\gc.lib WS2_32.lib advapi32.lib libcmt.lib dbghelp.lib ole32.lib shell32.lib legacy_stdio_definitions.lib /link /LIBPATH:$(pwd)\libs /STACK:0x800000 /ENTRY:wmainCRTStartup"
Invoke-Expression "cl crystal.obj /Fecrystal src\llvm\ext\llvm_ext.obj $(llvm\bin\llvm-config.exe --libs) libs\pcre2-8.lib libs\gc.lib WS2_32.lib advapi32.lib libcmt.lib dbghelp.lib ole32.lib shell32.lib legacy_stdio_definitions.lib /link /LIBPATH:$(pwd)\libs /STACK:0x800000 /ENTRY:wmainCRTStartup"
mkdir .build
mv crystal.exe .build/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ $(O)/primitives_spec: $(O)/crystal $(DEPS) $(SOURCES) $(SPEC_SOURCES)
$(O)/crystal: $(DEPS) $(SOURCES)
$(call check_llvm_config)
@mkdir -p $(O)
$(EXPORTS) $(EXPORTS_BUILD) ./bin/crystal build $(FLAGS) -o $@ src/compiler/crystal.cr -D without_openssl -D without_zlib -D use_pcre
$(EXPORTS) $(EXPORTS_BUILD) ./bin/crystal build $(FLAGS) -o $@ src/compiler/crystal.cr -D without_openssl -D without_zlib $(if $(PCRE1),-D use_pcre,-D use_pcre2)

$(LLVM_EXT_OBJ): $(LLVM_EXT_DIR)/llvm_ext.cc
$(call check_llvm_config)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ $(O)\crystal.exe: $(DEPS) $(SOURCES) $(O)\crystal.res
@$(call MKDIR,"$(O)")
$(call export_vars)
$(call export_build_vars)
.\bin\crystal build $(FLAGS) -o "$(O)\crystal-next.exe" src\compiler\crystal.cr -D without_openssl -D without_zlib -D without_playground -D use_pcre --link-flags=/PDBALTPATH:crystal.pdb "--link-flags=$(realpath $(O)\crystal.res)"
.\bin\crystal build $(FLAGS) -o "$(O)\crystal-next.exe" src\compiler\crystal.cr -D without_openssl -D without_zlib -D without_playground $(if $(PCRE1),-D use_pcre,-D use_pcre2) --link-flags=/PDBALTPATH:crystal.pdb "--link-flags=$(realpath $(O)\crystal.res)"
$(call MV,"$(O)\crystal-next.exe","$@")
$(call MV,"$(O)\crystal-next.pdb","$(O)\crystal.pdb")

Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ let
};

stdLibDeps = with pkgs; [
boehmgc gmp libevent libiconv libxml2 libyaml openssl pcre zlib
boehmgc gmp libevent libiconv libxml2 libyaml openssl pcre2 zlib
] ++ lib.optionals stdenv.isDarwin [ libiconv ];

tools = [ pkgs.hostname pkgs.git llvm_suite.extra ];
Expand Down

0 comments on commit 6aa4e2f

Please sign in to comment.