Skip to content

Commit 3595623

Browse files
committed
pivot_root: Final adjustments and reconciliations
1 parent 020a037 commit 3595623

File tree

17 files changed

+84
-76
lines changed

17 files changed

+84
-76
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
os: ubuntu-latest
7373
build_ocamlparam: ''
7474
ocamlparam: '_,Oclassic=1'
75-
disable_testcases: 'ocaml/testsuite/tests/typing-local/regression_cmm_unboxing.ml ocaml/testsuite/tests/int64-unboxing/test.ml'
75+
disable_testcases: 'testsuite/tests/typing-local/regression_cmm_unboxing.ml testsuite/tests/int64-unboxing/test.ml'
7676

7777
# CR ccasinghino: We encountered build errors (missing autoconf, and
7878
# then other errors) when `macos-latest` started referring to version

.github/workflows/jane_ocaml5.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
- name: Configure
7474
working-directory: ocaml-jst
7575
run: |
76+
autoconf
7677
./configure --prefix=$GITHUB_WORKSPACE/ocaml-5/_install --with-dune=$GITHUB_WORKSPACE/ocaml-414/_install/bin/dune
7778
7879
- name: Check that resolved files build

Makefile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
SHELL = /usr/bin/env bash
22
include Makefile.config
3-
include ocaml/Makefile.config
43
export ARCH
54

6-
boot_ocamlc = ocaml/main_native.exe
5+
boot_ocamlc = main_native.exe
76
boot_ocamlopt = boot_ocamlopt.exe
8-
boot_ocamlmklib = ocaml/tools/ocamlmklib.exe
9-
boot_ocamldep = ocaml/tools/ocamldep.exe
10-
boot_ocamlobjinfo = tools/flambda_backend_objinfo.exe
11-
ocamldir = ocaml
7+
boot_ocamlmklib = tools/ocamlmklib.exe
8+
boot_ocamldep = tools/ocamldep.exe
9+
boot_ocamlobjinfo = tools/objinfo.exe
10+
ocamldir = .
1211
toplevels_installed = top opttop
1312

1413
$(ocamldir)/duneconf/jst-extra.inc:
1514
echo > $@
1615

17-
include ocaml/Makefile.common-jst
16+
include Makefile.common-jst
1817

1918
.PHONY: ci
2019
ifeq ($(coverage),yes)

Makefile.common-jst

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ boot_targets = \
6161
$(boot_ocamlmklib) \
6262
$(boot_ocamldep) \
6363
$(boot_ocamlobjinfo) \
64-
ocaml/ocamltest/ocamltest.native
64+
ocamltest/ocamltest.native
6565

6666
boot-compiler: _build/_bootinstall
6767
RUNTIME_DIR=$(RUNTIME_DIR) $(dune) build $(ws_boot) $(coverage_dune_flags) $(boot_targets)
@@ -83,11 +83,11 @@ compiler: runtime-stdlib
8383
ASPP="$(ASPP)" ASPPFLAGS="$(ASPPFLAGS)" \
8484
$(dune) build $(ws_main) \
8585
--only-package=ocaml @install \
86-
testsuite/tools/expect.exe \
87-
testsuite/tools/codegen_main.exe \
88-
testsuite/tools/asmgen_$(ARCH).o \
89-
ocaml/testsuite/lib/lib.cm{,x}a \
90-
ocaml/testsuite/lib/testing.cm{,x}a \
86+
flambda-backend/testsuite/tools/expect.exe \
87+
flambda-backend/testsuite/tools/codegen_main.exe \
88+
flambda-backend/testsuite/tools/asmgen_$(ARCH).o \
89+
testsuite/lib/lib.cm{,x}a \
90+
testsuite/lib/testing.cm{,x}a \
9191
$(ocamldir)/tools/dumpobj.bc
9292

9393
runtest: compiler
@@ -194,11 +194,8 @@ _install: compiler
194194
for file in $(toplevels_installed); do \
195195
cp -f _install/lib/ocaml/compiler-libs/$${file}dirs.{cmi,mli,cmt,cmti} _install/lib/ocaml; \
196196
done
197-
shopt -s nullglob; for file in _build/main/$(ocamldir)/.ocaml{bytecomp,common,middleend,optcomp}.objs/{byte/*.{cmi,cma,cmt,cmti},native/*.{cmx,cmxa,cmxs}}; do \
198-
$(cpl) $$file _install/lib/ocaml/compiler-libs/ ; \
199-
done
200197
mkdir _install/lib/stublibs
201-
cp _build/main/ocaml/parser.cmly _install/lib/ocaml/compiler-libs/
198+
cp _build/main/parser.cmly _install/lib/ocaml/compiler-libs/
202199
find _build/main/ \( -name "flambda2*.cmi" \
203200
-or -name "flambda2*.cmti" -or -name "flambda2*.cmt" \) \
204201
-exec cp -f {} _install/lib/ocaml/compiler-libs \;
@@ -227,38 +224,38 @@ install_for_test: _install
227224
$(cpl) -a $(ocamldir)/testsuite _runtest/testsuite
228225
# replace backend-specific testsuite/tools with their new versions
229226
rm -f _runtest/testsuite/tools/*
230-
cp -a testsuite/tools/* _runtest/testsuite/tools/
231-
cp $(main_build)/testsuite/tools/expect.exe _runtest/testsuite/tools/expect
227+
cp -a flambda-backend/testsuite/tools/* _runtest/testsuite/tools/
228+
cp $(main_build)/flambda-backend/testsuite/tools/expect.exe _runtest/testsuite/tools/expect
232229
chmod 755 _runtest/testsuite/tools/expect
233-
cp $(main_build)/testsuite/tools/codegen_main.exe \
230+
cp $(main_build)/flambda-backend/testsuite/tools/codegen_main.exe \
234231
_runtest/testsuite/tools/codegen
235232
chmod 755 _runtest/testsuite/tools/codegen
236-
cp $(main_build)/testsuite/tools/asmgen_*.o \
233+
cp $(main_build)/flambda-backend/testsuite/tools/asmgen_*.o \
237234
_runtest/testsuite/tools/
238-
cp $(main_build)/ocaml/testsuite/lib/lib.{a,cmxa,cma} \
235+
cp $(main_build)/testsuite/lib/lib.{a,cmxa,cma} \
239236
_runtest/testsuite/lib/
240-
cp $(main_build)/ocaml/testsuite/lib/.lib.objs/byte/lib.cm* \
237+
cp $(main_build)/testsuite/lib/.lib.objs/byte/lib.cm* \
241238
_runtest/testsuite/lib/
242-
cp $(main_build)/ocaml/testsuite/lib/.lib.objs/native/lib.cm* \
239+
cp $(main_build)/testsuite/lib/.lib.objs/native/lib.cm* \
243240
_runtest/testsuite/lib/
244-
cp $(main_build)/ocaml/testsuite/lib/testing.{a,cmxa,cma} \
241+
cp $(main_build)/testsuite/lib/testing.{a,cmxa,cma} \
245242
_runtest/testsuite/lib/
246-
cp $(main_build)/ocaml/testsuite/lib/.testing.objs/byte/testing.cm* \
243+
cp $(main_build)/testsuite/lib/.testing.objs/byte/testing.cm* \
247244
_runtest/testsuite/lib/
248-
cp $(main_build)/ocaml/testsuite/lib/.testing.objs/native/testing.cm* \
245+
cp $(main_build)/testsuite/lib/.testing.objs/native/testing.cm* \
249246
_runtest/testsuite/lib/
250247
# replace backend-specific testsuite/tests/asmcomp with their new versions
251248
rm _runtest/testsuite/tests/asmcomp/*
252-
cp -a testsuite/tests/asmcomp/* _runtest/testsuite/tests/asmcomp/
249+
cp -a flambda-backend/testsuite/tests/asmcomp/* _runtest/testsuite/tests/asmcomp/
253250
# replace backend-specific testsuite/tests/asmgen with their new versions
254251
rm _runtest/testsuite/tests/asmgen/*
255-
cp -a testsuite/tests/asmgen/* _runtest/testsuite/tests/asmgen/
252+
cp -a flambda-backend/testsuite/tests/asmgen/* _runtest/testsuite/tests/asmgen/
256253
# replace backend-specific testsuite/tests/unboxed-primitive-args with their new versions
257254
rm _runtest/testsuite/tests/unboxed-primitive-args/*
258-
cp -a testsuite/tests/unboxed-primitive-args/* _runtest/testsuite/tests/unboxed-primitive-args/
255+
cp -a flambda-backend/testsuite/tests/unboxed-primitive-args/* _runtest/testsuite/tests/unboxed-primitive-args/
259256
# add extension library tests that are not supported by the upstream compiler
260257
rm _runtest/testsuite/tests/lib-extensions/*
261-
cp -a testsuite/tests/lib-extensions/* _runtest/testsuite/tests/lib-extensions
258+
cp -a flambda-backend/testsuite/tests/lib-extensions/* _runtest/testsuite/tests/lib-extensions
262259

263260
cp $(ocamldir)/Makefile.* _runtest/
264261

@@ -335,11 +332,11 @@ install_for_test: _install
335332
# cp $(main_build)/$(ocamldir)/ocamldoc/.odoc_lib.objs/byte/*.cm* _runtest/ocamldoc
336333
# ocamltest itself
337334
mkdir _runtest/ocamltest
338-
cp $(boot_build)/ocaml/ocamltest/ocamltest.native _runtest/ocamltest/ocamltest
335+
cp $(boot_build)/ocamltest/ocamltest.native _runtest/ocamltest/ocamltest
339336
test: install_for_test
340337
if [ "$(middle_end)" = "flambda2" ]; then \
341-
for dir in `cd ocaml/testsuite; ls -1 -d tests/*`; do \
342-
if ! grep -q "^ $$dir " testsuite/flambda2-test-list; then \
338+
for dir in `cd testsuite; ls -1 -d tests/*`; do \
339+
if ! grep -q "^ $$dir " flambda-backend/testsuite/flambda2-test-list; then \
343340
echo " $$dir"; \
344341
fi; \
345342
done > _runtest/flambda2-test-list; \

backend/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
(with-stdout-to %{targets}
3636
(progn
3737
(bash "echo \\# 1 \\\"`cat contains-input-name`\\\"")
38-
(bash "%{dep:../ocaml/tools/cvt_emit.exe} < `cat contains-input-name`"))))))
38+
(bash "%{dep:../tools/cvt_emit.exe} < `cat contains-input-name`"))))))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
i=10000 name=Raised at T.break in file "tests/backend/frame-too-long/t.ml", line 5, characters 2-15
1+
i=10000 name=Raised at T.break in file "flambda-backend/tests/backend/frame-too-long/t.ml", line 5, characters 2-15

flambda-backend/tests/simd/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
(language c)
1313
(names stubs)
1414
(flags -msse4.2)
15-
(include_dirs "../../ocaml/%{env:RUNTIME_DIR=runtime-dir-env-var-not-set}"))
15+
(include_dirs "../../../%{env:RUNTIME_DIR=runtime-dir-env-var-not-set}"))
1616

1717
; Tests with external assembler
1818

flambda-backend/tests/small_numbers/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
(language c)
66
(names stubs)
77
(flags -msse4.2)
8-
(include_dirs "../../ocaml/%{env:RUNTIME_DIR=runtime-dir-env-var-not-set}"))
8+
(include_dirs "../../../%{env:RUNTIME_DIR=runtime-dir-env-var-not-set}"))
99

1010
; Tests with external assembler
1111

jane/build-resolved-files-for-ci

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
cd $(dirname $0)/../..
3+
cd $(dirname $0)/..
44

55
set -euo pipefail
66

@@ -15,29 +15,29 @@ mlis=$(
1515
{ # echo driver/{compenv,compmisc,main_args}.mli
1616
# echo file_formats/{cmi,cmo,cms,cmt}_format.mli
1717
# echo {utils,typing,lambda}/*.mli
18-
echo ocaml/{parsing,typing,lambda}/*.mli
18+
echo {parsing,typing,lambda}/*.mli
1919
} |
2020
tr ' ' '\n'
2121
)
2222
echo "$mlis"
2323
dune_targets=$(
2424
for mli in $mlis; do
2525
cmi=$(basename ${mli%.mli})
26-
echo _build/default/ocaml/.ocamlcommon.objs/byte/$cmi.cmi
26+
echo _build/default/.ocamlcommon.objs/byte/$cmi.cmi
2727
done
2828
)
2929

3030
# ocamlcommon mls
3131
mls=$(
32-
{ echo ocaml/parsing/*.ml
33-
echo ocaml/typing/*.ml
32+
{ echo parsing/*.ml
33+
echo typing/*.ml
3434
} | tr ' ' '\n'
3535
)
3636
echo "$mls"
3737
dune_targets=$(
3838
for ml in $mls; do
3939
cmx=$(basename ${ml%.ml})
40-
echo _build/default/ocaml/.ocamlcommon.objs/native/$cmx.cmx
40+
echo _build/default/.ocamlcommon.objs/native/$cmx.cmx
4141
done
4242
)
4343

runtime/caml/dune

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
(deps
2929
instruct.h
3030
../../stdlib/StdlibModules
31-
../../Makefile
31+
../../Makefile.upstream
3232
../../Makefile.common
3333
../../Makefile.config
3434
../../Makefile.build_config
3535
../../Makefile.config_if_required
3636
../../Makefile.best_binaries)
3737
(action
38-
(run make -s -C ../.. COMPUTE_DEPS=false runtime/caml/opnames.h)))
38+
(run make -s -f Makefile.upstream -C ../.. COMPUTE_DEPS=false runtime/caml/opnames.h)))
3939

4040
(rule
4141
(targets version.h)

0 commit comments

Comments
 (0)