Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions .depend
Original file line number Diff line number Diff line change
Expand Up @@ -9572,6 +9572,14 @@ testsuite/lib/testing.cmo : \
testsuite/lib/testing.cmx : \
testsuite/lib/testing.cmi
testsuite/lib/testing.cmi :
testsuite/tools/cmdline.cmo : \
testsuite/tools/harness.cmi \
testsuite/tools/cmdline.cmi
testsuite/tools/cmdline.cmx : \
testsuite/tools/harness.cmx \
testsuite/tools/cmdline.cmi
testsuite/tools/cmdline.cmi : \
testsuite/tools/harness.cmi
testsuite/tools/codegen_main.cmo : \
utils/profile.cmi \
testsuite/tools/parsecmmaux.cmi \
Expand All @@ -9595,6 +9603,28 @@ testsuite/tools/codegen_main.cmx : \
asmcomp/asmgen.cmx \
testsuite/tools/codegen_main.cmi
testsuite/tools/codegen_main.cmi :
testsuite/tools/environment.cmo : \
otherlibs/unix/unix.cmi \
utils/misc.cmi \
testsuite/tools/harness.cmi \
utils/config.cmi \
utils/compression.cmi \
file_formats/cmt_format.cmi \
file_formats/cmo_format.cmi \
bytecomp/bytesections.cmi \
testsuite/tools/environment.cmi
testsuite/tools/environment.cmx : \
otherlibs/unix/unix.cmx \
utils/misc.cmx \
testsuite/tools/harness.cmx \
utils/config.cmx \
utils/compression.cmx \
file_formats/cmt_format.cmx \
file_formats/cmo_format.cmi \
bytecomp/bytesections.cmx \
testsuite/tools/environment.cmi
testsuite/tools/environment.cmi : \
testsuite/tools/harness.cmi
testsuite/tools/expect.cmo : \
utils/warnings.cmi \
toplevel/toploop.cmi \
Expand Down Expand Up @@ -9633,6 +9663,15 @@ testsuite/tools/expect.cmx : \
testsuite/tools/expect.cmi
testsuite/tools/expect.cmi : \
parsing/location.cmi
testsuite/tools/harness.cmo : \
otherlibs/unix/unix.cmi \
utils/config.cmi \
testsuite/tools/harness.cmi
testsuite/tools/harness.cmx : \
otherlibs/unix/unix.cmx \
utils/config.cmx \
testsuite/tools/harness.cmi
testsuite/tools/harness.cmi :
testsuite/tools/lexcmm.cmo : \
testsuite/tools/parsecmm.cmi \
utils/misc.cmi \
Expand Down Expand Up @@ -9689,3 +9728,135 @@ testsuite/tools/parsecmmaux.cmi : \
parsing/location.cmi \
lambda/debuginfo.cmi \
middle_end/backend_var.cmi
testsuite/tools/testBytecodeBinaries.cmo : \
otherlibs/unix/unix.cmi \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/testBytecodeBinaries.cmi
testsuite/tools/testBytecodeBinaries.cmx : \
otherlibs/unix/unix.cmx \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
testsuite/tools/testBytecodeBinaries.cmi
testsuite/tools/testBytecodeBinaries.cmi : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi
testsuite/tools/testDynlink.cmo : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/testDynlink.cmi
testsuite/tools/testDynlink.cmx : \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
testsuite/tools/testDynlink.cmi
testsuite/tools/testDynlink.cmi : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi
testsuite/tools/testLinkModes.cmo : \
testsuite/tools/toolchain.cmi \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
utils/ccomp.cmi \
testsuite/tools/testLinkModes.cmi
testsuite/tools/testLinkModes.cmx : \
testsuite/tools/toolchain.cmx \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
utils/ccomp.cmx \
testsuite/tools/testLinkModes.cmi
testsuite/tools/testLinkModes.cmi : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi
testsuite/tools/testRelocation.cmo : \
otherlibs/unix/unix.cmi \
testsuite/tools/toolchain.cmi \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/testRelocation.cmi
testsuite/tools/testRelocation.cmx : \
otherlibs/unix/unix.cmx \
testsuite/tools/toolchain.cmx \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
testsuite/tools/testRelocation.cmi
testsuite/tools/testRelocation.cmi : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi
testsuite/tools/testToplevel.cmo : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/testToplevel.cmi
testsuite/tools/testToplevel.cmx : \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
testsuite/tools/testToplevel.cmi
testsuite/tools/testToplevel.cmi : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi
testsuite/tools/test_in_prefix.cmo : \
otherlibs/unix/unix.cmi \
testsuite/tools/toolchain.cmi \
testsuite/tools/test_ld_conf.cmi \
testsuite/tools/testToplevel.cmi \
testsuite/tools/testRelocation.cmi \
testsuite/tools/testLinkModes.cmi \
testsuite/tools/testDynlink.cmi \
testsuite/tools/testBytecodeBinaries.cmi \
utils/misc.cmi \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
driver/compmisc.cmi \
testsuite/tools/cmdline.cmi \
utils/clflags.cmi \
testsuite/tools/test_in_prefix.cmi
testsuite/tools/test_in_prefix.cmx : \
otherlibs/unix/unix.cmx \
testsuite/tools/toolchain.cmx \
testsuite/tools/test_ld_conf.cmx \
testsuite/tools/testToplevel.cmx \
testsuite/tools/testRelocation.cmx \
testsuite/tools/testLinkModes.cmx \
testsuite/tools/testDynlink.cmx \
testsuite/tools/testBytecodeBinaries.cmx \
utils/misc.cmx \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
driver/compmisc.cmx \
testsuite/tools/cmdline.cmx \
utils/clflags.cmx \
testsuite/tools/test_in_prefix.cmi
testsuite/tools/test_in_prefix.cmi :
testsuite/tools/test_ld_conf.cmo : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/test_ld_conf.cmi
testsuite/tools/test_ld_conf.cmx : \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
testsuite/tools/test_ld_conf.cmi
testsuite/tools/test_ld_conf.cmi : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi
testsuite/tools/toolchain.cmo : \
testsuite/tools/harness.cmi \
utils/config.cmi \
testsuite/tools/toolchain.cmi
testsuite/tools/toolchain.cmx : \
testsuite/tools/harness.cmx \
utils/config.cmx \
testsuite/tools/toolchain.cmi
testsuite/tools/toolchain.cmi :
10 changes: 9 additions & 1 deletion .github/workflows/build-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
if (labels.some(label => label.name === 'CI: Full matrix')) {
console.log('Full matrix requested');
// # Test bytecode-only Cygwin
include.push({cc: 'gcc', arch: 'x86_64', config_arg: '--disable-native-compiler'});
include.push({cc: 'gcc', arch: 'x86_64', config_arg: '--disable-native-toplevel --disable-native-compiler'});
}
}
return {config_arg: [''], arch: ['x86_64'], cc: compilers, include: include};
Expand Down Expand Up @@ -156,6 +156,8 @@ jobs:
--prefix "${{ matrix.cc != 'gcc' && '$PROGRAMFILES/Бактріан🐫' || '$(cygpath "$PROGRAMFILES/Бактріан🐫")'}}"
${{ matrix.cc != 'gcc' && format('--host={0}-pc-windows', matrix.arch) || '' }}
${{ matrix.cc != 'gcc' && format('CC={0}', matrix.cc) || '' }}
--enable-ocamltest
${{ endsWith(matrix.arch, '64') && '--enable-native-toplevel' || '--disable-native-toplevel' }}
${{ matrix.config_arg }}
run: |
eval $(tools/msvs-promote-path)
Expand Down Expand Up @@ -213,3 +215,9 @@ jobs:
- name: Install the compiler
run: make install
if: needs.config.outputs.full-matrix == 'true'

- name: Test in prefix
run: |
eval $(tools/msvs-promote-path)
make -f Makefile.test -C testsuite/in_prefix test-in-prefix
if: needs.config.outputs.full-matrix == 'true'
34 changes: 28 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ jobs:
if: matrix.id == 'normal'
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh install
- name: Test in prefix
if: matrix.id == 'normal'
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh test-in-prefix
- name: Build the manual
if: matrix.id == 'normal' && needs.build.outputs.manual_changed == 'true'
run: |
Expand All @@ -160,9 +164,12 @@ jobs:
let jobs = [
{name: 'linux-O0', os: 'ubuntu-latest',
config_arg: "CFLAGS='-O0'"},
{name: 'linux-arm64', os: 'ubuntu-24.04-arm'},
{name: 'macos-x86_64', os: 'macos-15-intel'},
{name: 'macos-arm64', os: 'macos-latest'}];
{name: 'linux-arm64', os: 'ubuntu-24.04-arm',
'test-in-prefix': true},
{name: 'macos-x86_64', os: 'macos-15-intel',
'test-in-prefix': true},
{name: 'macos-arm64', os: 'macos-latest',
'test-in-prefix': true}];
// # If this is a pull request, see if the PR has the
// # 'CI: Full matrix' label. This is done using an API request,
// # rather than from context.payload.pull_request.labels, since we
Expand All @@ -178,9 +185,10 @@ jobs:
// # Add "static" and "minimal" jobs
jobs = jobs.concat([
{name: 'static', os: 'ubuntu-latest',
config_arg: '--disable-shared'},
config_arg: '--disable-native-toplevel --disable-shared',
'test-in-prefix': true},
{name: 'minimal', os: 'ubuntu-latest',
config_arg: '--disable-native-compiler --disable-shared --disable-debug-runtime --disable-instrumented-runtime --disable-systhreads --disable-str-lib --disable-unix-lib --disable-ocamldoc'}]);
config_arg: '--disable-native-toplevel --disable-native-compiler --disable-shared --disable-debug-runtime --disable-instrumented-runtime --disable-systhreads --disable-str-lib --disable-unix-lib --disable-ocamldoc'}]);
}
}
return jobs;
Expand Down Expand Up @@ -234,6 +242,14 @@ jobs:
for dir in $PARALLEL_TESTS; do \
bash -cxe "SHOW_TIMINGS=1 tools/ci/actions/runner.sh test_prefix $dir"; \
done
- name: Install
if: ${{ matrix.test-in-prefix }}
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh install
- name: Test in prefix
if: ${{ matrix.test-in-prefix }}
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh test-in-prefix

i386:
runs-on: ubuntu-latest
Expand All @@ -253,11 +269,17 @@ jobs:
- name: configure tree
run: |
chown -R ocaml:ocaml .
MAKE_ARG=-j su ocaml -c "bash -xe tools/ci/actions/runner.sh configure"
MAKE_ARG=-j CONFIG_ARG='--disable-native-toplevel' su ocaml -c "bash -xe tools/ci/actions/runner.sh configure"
- name: Build
run: |
MAKE_ARG=-j su ocaml -c "bash -xe tools/ci/actions/runner.sh build"
- name: Run the testsuite
if: ${{ needs.config.outputs.skip-testsuite != 'true' }}
run: |
su ocaml -c "bash -xe tools/ci/actions/runner.sh test"
- name: Install
run: |
su ocaml -c "bash -xe tools/ci/actions/runner.sh install"
- name: Test in prefix
run: |
su ocaml -c "bash -xe tools/ci/actions/runner.sh test-in-prefix"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,15 @@ META
/testsuite/_retries

/testsuite/tools/codegen
/testsuite/tools/dump_load_path
/testsuite/tools/expect
/testsuite/tools/lexcmm.ml
/testsuite/tools/parsecmm.ml
/testsuite/tools/parsecmm.mli
/testsuite/tools/parsecmm.output
/testsuite/tools/test_in_prefix
/testsuite/tools/test_in_prefix.opt
/testsuite/tools/toolchain.ml

/tools/ocamldep
/tools/ocamldep.opt
Expand Down
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,37 @@ $(asmgen_OBJECT): $(asmgen_SOURCE)
$(V_ASM)$(ASPP) $(OC_ASPPFLAGS) -o $@ $< || $(ASPP_ERROR)
endif

test_in_prefix_SOURCES = $(addprefix testsuite/tools/,\
stubs.c \
harness.mli harness.ml \
toolchain.mli toolchain.ml \
environment.mli environment.ml \
cmdline.mli cmdline.ml \
testBytecodeBinaries.mli testBytecodeBinaries.ml \
testDynlink.mli testDynlink.ml \
testLinkModes.mli testLinkModes.ml \
testRelocation.mli testRelocation.ml \
testToplevel.mli testToplevel.ml \
test_ld_conf.mli test_ld_conf.ml \
test_in_prefix.mli test_in_prefix.ml)
test_in_prefix_LIBRARIES = \
otherlibs/unix/unix compilerlibs/ocamlcommon compilerlibs/ocamlbytecomp

# Needed for the additional stubs.c (since caml_sys_proc_self_exe is 5.5+)
$(eval $(call COMPILE_C_FILE,testsuite/tools/%.b,testsuite/tools/%))
$(eval $(call COMPILE_C_FILE,testsuite/tools/%.n,testsuite/tools/%))

# test_in_prefix% would only match test_in_prefix.opt, hence the missing 'x'!
testsuite/tools/test_in_prefi%: CAMLC = $(BEST_OCAMLC) $(STDLIBFLAGS)

testsuite/tools/test_in_prefix$(EXE): OC_BYTECODE_LINKFLAGS += -custom

testsuite/tools/test_in_prefi%: CAMLOPT = $(BEST_OCAMLOPT) $(STDLIBFLAGS)

testsuite/tools/dump_load_path$(EXE): \
testsuite/tools/dump_load_path.$(O) runtime/prims.$(O) runtime/libcamlrun.$(A)
$(V_MKEXE)$(MKEXE) -o $@ $^ $(BYTECCLIBS)

ocamltest/ocamltest$(EXE): OC_BYTECODE_LINKFLAGS += -custom

ocamltest/ocamltest$(EXE): ocamlc ocamlyacc ocamllex
Expand Down Expand Up @@ -1910,7 +1941,11 @@ partialclean::
rm -f $(addprefix testsuite/lib/*.,cm* o obj a lib)
rm -f $(addprefix testsuite/tools/*.,cm* o obj a lib)
rm -f testsuite/tools/codegen testsuite/tools/codegen.exe
rm -f testsuite/tools/dump_load_path testsuite/tools/dump_load_path.exe
rm -f testsuite/tools/expect testsuite/tools/expect.exe
rm -f testsuite/tools/test_in_prefix testsuite/tools/test_in_prefix.exe
rm -f testsuite/tools/test_in_prefix.opt \
testsuite/tools/test_in_prefix.opt.exe
rm -f testsuite/tools/lexcmm.ml
rm -f $(addprefix testsuite/tools/parsecmm., ml mli output)

Expand Down Expand Up @@ -2425,6 +2460,7 @@ distclean: clean
$(MAKE) -C manual distclean
rm -f ocamldoc/META
rm -f $(addprefix ocamltest/,ocamltest_config.ml ocamltest_unix.ml)
rm -f testsuite/tools/toolchain.ml
$(MAKE) -C otherlibs distclean
rm -f $(runtime_CONFIGURED_HEADERS)
$(MAKE) -C stdlib distclean
Expand Down
5 changes: 5 additions & 0 deletions Makefile.build_config.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ INSTALL ?= @INSTALL@ -p
INSTALL_DATA ?= @INSTALL_DATA@
INSTALL_PROG ?= @INSTALL_PROGRAM@

SRCDIR_ABS = @ocamlsrcdir@

# Whether to build certain libraries and tools

build_ocamldebug = @build_ocamldebug@
Expand Down Expand Up @@ -63,6 +65,9 @@ INSTALL_OCAMLNAT = @install_ocamlnat@
DEP_CC=@DEP_CC@ -MM
COMPUTE_DEPS=@compute_deps@

# The C compiler vendor
OCAML_CC_VENDOR = @ocaml_cc_vendor@

# Build-system flags to use to compile C files
OC_CFLAGS=@oc_cflags@
OC_CPPFLAGS=-I$(ROOTDIR)/runtime @oc_cppflags@
Expand Down
2 changes: 2 additions & 0 deletions bytecomp/dll.ml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,5 @@ let reset () =
search_path := [];
opened_dlls :=[];
linking_in_core := false

let search_path () = !search_path
Loading
Loading