Skip to content

Commit 236586e

Browse files
authored
Get rid of static linking patch (#5922)
* Fix reanalyze not found * Get rid of static linking patch
1 parent c2005e9 commit 236586e

File tree

11 files changed

+48
-126
lines changed

11 files changed

+48
-126
lines changed

.github/workflows/ci.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ concurrency:
1313

1414
env:
1515
OCAMLRUNPARAM: b
16-
DUNE_PROFILE: release
1716

1817
jobs:
1918
# Build statically linked Linux binaries in an Alpine-based Docker container
@@ -31,11 +30,8 @@ jobs:
3130
- name: Checkout
3231
uses: actions/checkout@v3
3332

34-
- name: Apply static linking patch
35-
run: git apply scripts/dune-static-linking.patch
36-
3733
- name: Build compiler binaries
38-
run: opam exec -- dune build
34+
run: opam exec -- dune build --profile static
3935

4036
- name: Build ninja binary
4137
working-directory: ninja
@@ -63,7 +59,6 @@ jobs:
6359
runs-on: ${{matrix.os}}
6460

6561
env:
66-
OCAMLRUNPARAM: b
6762
DUNE_PROFILE: release
6863

6964
steps:
@@ -137,11 +132,11 @@ jobs:
137132
138133
- name: "Syntax: Run roundtrip tests"
139134
if: ${{ env.syntax_status == 'changed' && runner.os != 'Windows' }}
140-
run: make test-syntax-roundtrip
135+
run: opam exec -- make test-syntax-roundtrip
141136

142137
- name: "Syntax: Run tests (Windows)"
143138
if: ${{ env.syntax_status == 'changed' && runner.os == 'Windows' }}
144-
run: make test-syntax
139+
run: opam exec -- make test-syntax
145140

146141
- name: Build runtime/stdlib
147142
if: runner.os != 'Windows'

jscomp/bsb_exe/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name rescript_main)
38
(public_name rescript)

jscomp/bsb_helper_exe/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name bsb_helper_main)
38
(public_name bsb_helper)

jscomp/bsc/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name rescript_compiler_main)
38
(public_name bsc)

jscomp/cmij/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executables
27
(names cmij_main cmjdump_main)
38
(public_names cmij cmjdump)

jscomp/dune

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
(env-vars
88
(CPPO_FLAGS -U=RELEASE)))
99
(release
10+
(env-vars
11+
(CPPO_FLAGS -D=RELEASE))
12+
(ocamlopt_flags
13+
(:standard -O3 -unbox-closures)))
14+
(static
1015
(env-vars
1116
(CPPO_FLAGS -D=RELEASE))
1217
(ocamlopt_flags

jscomp/ounit_tests/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name ounit_tests_main)
38
(public_name ounit_tests)

res_syntax/benchmarks/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name benchmark)
38
(public_name syntax_benchmarks)

res_syntax/cli/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name res_cli)
38
(public_name res_parser)

res_syntax/testrunner/dune

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
(env
2+
(static
3+
(flags
4+
(:standard -ccopt -static))))
5+
16
(executable
27
(name res_test)
38
(public_name syntax_tests)

scripts/dune-static-linking.patch

-118
This file was deleted.

0 commit comments

Comments
 (0)