Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5332d93
Merge pull request PR#13988 from dra27/unified-header
nojb Jun 28, 2025
180994d
Merge pull request PR#14243 from dra27/ld.conf
Octachron Nov 28, 2025
c297da1
Merge pull request PR#14244 from dra27/enable-relative
gasche Dec 8, 2025
296c534
Resolve conflicts
dra27 Dec 8, 2025
52ebaad
Merge pull request PR#14802 from dra27/fix-libdir-detection
gasche May 14, 2026
fd46f79
Merge pull request PR#14846 from dra27/fix-configure
gasche Jun 5, 2026
aa220eb
Adapt the build for lack of bootstrap
dra27 Jun 12, 2026
cb8765b
Adapt to OCaml 5.4
dra27 Jun 12, 2026
58f8ad3
Merge pull request PR#14245 from dra27/runtime-searching
nojb Dec 12, 2025
ad1cb05
Merge pull request PR#14669 from dra27/version-free-bootstrap
dra27 Mar 24, 2026
e18e51b
Resolve conflicts
dra27 Sep 6, 2026
27b8210
Adapt the build for lack of bootstrap
dra27 Jun 13, 2026
9a3c073
Adapt to OCaml 5.4
dra27 Jun 13, 2026
c1484cd
Backporting - reduce interface changes
dra27 Jun 13, 2026
b74c01a
Backporting - reduce runtime header changes
dra27 Jun 18, 2026
6b5e261
Change the default for --enable-suffixing
dra27 Nov 13, 2024
9f6ad47
Revert change to Cmo_format.library
dra27 Jun 13, 2026
bf703dd
Revert change to Cmx_format.unit_infos
dra27 Jun 18, 2026
c093c03
Bootstrap
dra27 Sep 6, 2026
64f85d5
Clean-up post-bootstrap
dra27 Jun 13, 2026
a8aea64
Merge pull request PR#14246 from dra27/opam-install-file
NickBarnes Dec 17, 2025
8848f3f
Merge pull request PR#14914 from dra27/opam-generate-clean-env
dra27 Jul 25, 2026
cfb776d
Merge pull request PR#14923 from dra27/explicit-clone
dra27 Jul 31, 2026
c060589
Resolve conflicts
dra27 Sep 6, 2026
c2a7bd7
Don't backport process.sh
dra27 Jul 19, 2025
f416470
Merge pull request PR#14152 from dra27/export-ignore
dra27 Feb 17, 2026
ff79c6f
Resolve conflicts
dra27 Sep 6, 2026
8fa734e
OCaml 5.4.2+relocatable base version commit
dra27 Sep 27, 2024
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
50 changes: 47 additions & 3 deletions .depend
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ utils/clflags.cmx : \
utils/clflags.cmi
utils/clflags.cmi : \
utils/profile.cmi \
utils/misc.cmi
utils/misc.cmi \
utils/config.cmi
utils/compression.cmo : \
utils/compression.cmi
utils/compression.cmx : \
Expand Down Expand Up @@ -2364,6 +2365,7 @@ bytecomp/bytelibrarian.cmo : \
utils/linkdeps.cmi \
utils/format_doc.cmi \
bytecomp/emitcode.cmi \
bytecomp/dll.cmi \
utils/config.cmi \
file_formats/cmo_format.cmi \
utils/clflags.cmi \
Expand All @@ -2376,6 +2378,7 @@ bytecomp/bytelibrarian.cmx : \
utils/linkdeps.cmx \
utils/format_doc.cmx \
bytecomp/emitcode.cmx \
bytecomp/dll.cmx \
utils/config.cmx \
file_formats/cmo_format.cmi \
utils/clflags.cmx \
Expand Down Expand Up @@ -2490,14 +2493,17 @@ bytecomp/bytesections.cmi :
bytecomp/dll.cmo : \
utils/misc.cmi \
utils/config.cmi \
file_formats/cmo_format.cmi \
utils/binutils.cmi \
bytecomp/dll.cmi
bytecomp/dll.cmx : \
utils/misc.cmx \
utils/config.cmx \
file_formats/cmo_format.cmi \
utils/binutils.cmx \
bytecomp/dll.cmi
bytecomp/dll.cmi :
bytecomp/dll.cmi : \
file_formats/cmo_format.cmi
bytecomp/emitcode.cmo : \
parsing/unit_info.cmi \
lambda/translmod.cmi \
Expand Down Expand Up @@ -5235,6 +5241,7 @@ middle_end/flambda/closure_conversion.cmo : \
lambda/debuginfo.cmi \
middle_end/convert_primitives.cmi \
utils/config.cmi \
middle_end/compilenv.cmi \
middle_end/compilation_unit.cmi \
middle_end/flambda/base_types/closure_origin.cmi \
middle_end/flambda/base_types/closure_id.cmi \
Expand Down Expand Up @@ -5264,6 +5271,7 @@ middle_end/flambda/closure_conversion.cmx : \
lambda/debuginfo.cmx \
middle_end/convert_primitives.cmx \
utils/config.cmx \
middle_end/compilenv.cmx \
middle_end/compilation_unit.cmx \
middle_end/flambda/base_types/closure_origin.cmx \
middle_end/flambda/base_types/closure_id.cmx \
Expand Down Expand Up @@ -7973,6 +7981,17 @@ lex/table.cmo : \
lex/table.cmx : \
lex/table.cmi
lex/table.cmi :
tools/byterntm.cmo : \
utils/misc.cmi \
bytecomp/bytesections.cmi \
tools/byterntm.cmi
tools/byterntm.cmx : \
utils/misc.cmx \
bytecomp/bytesections.cmx \
tools/byterntm.cmi
tools/byterntm.cmi : \
utils/misc.cmi \
bytecomp/bytesections.cmi
tools/cmpbyt.cmo : \
bytecomp/bytesections.cmi \
tools/cmpbyt.cmi
Expand Down Expand Up @@ -8068,13 +8087,17 @@ tools/objinfo.cmo : \
typing/ident.cmi \
utils/format_doc.cmi \
middle_end/flambda/export_info.cmi \
bytecomp/dll.cmi \
utils/config.cmi \
middle_end/compilenv.cmi \
middle_end/compilation_unit.cmi \
file_formats/cmxs_format.cmi \
file_formats/cmx_format.cmi \
file_formats/cmt_format.cmi \
file_formats/cmo_format.cmi \
file_formats/cmi_format.cmi \
bytecomp/bytesections.cmi \
tools/byterntm.cmi \
utils/binutils.cmi \
tools/objinfo.cmi
tools/objinfo.cmx : \
Expand All @@ -8091,13 +8114,17 @@ tools/objinfo.cmx : \
typing/ident.cmx \
utils/format_doc.cmx \
middle_end/flambda/export_info.cmx \
bytecomp/dll.cmx \
utils/config.cmx \
middle_end/compilenv.cmx \
middle_end/compilation_unit.cmx \
file_formats/cmxs_format.cmi \
file_formats/cmx_format.cmi \
file_formats/cmt_format.cmx \
file_formats/cmo_format.cmi \
file_formats/cmi_format.cmx \
bytecomp/bytesections.cmx \
tools/byterntm.cmx \
utils/binutils.cmx \
tools/objinfo.cmi
tools/objinfo.cmi :
Expand Down Expand Up @@ -10522,9 +10549,11 @@ testsuite/lib/testing.cmx : \
testsuite/lib/testing.cmi :
testsuite/tools/cmdline.cmo : \
testsuite/tools/harness.cmi \
utils/config.cmi \
testsuite/tools/cmdline.cmi
testsuite/tools/cmdline.cmx : \
testsuite/tools/harness.cmx \
utils/config.cmx \
testsuite/tools/cmdline.cmi
testsuite/tools/cmdline.cmi : \
testsuite/tools/harness.cmi
Expand Down Expand Up @@ -10560,6 +10589,7 @@ testsuite/tools/environment.cmo : \
file_formats/cmt_format.cmi \
file_formats/cmo_format.cmi \
bytecomp/bytesections.cmi \
tools/byterntm.cmi \
testsuite/tools/environment.cmi
testsuite/tools/environment.cmx : \
otherlibs/unix/unix.cmx \
Expand All @@ -10570,6 +10600,7 @@ testsuite/tools/environment.cmx : \
file_formats/cmt_format.cmx \
file_formats/cmo_format.cmi \
bytecomp/bytesections.cmx \
tools/byterntm.cmx \
testsuite/tools/environment.cmi
testsuite/tools/environment.cmi : \
testsuite/tools/harness.cmi
Expand Down Expand Up @@ -10613,13 +10644,20 @@ testsuite/tools/expect.cmi : \
parsing/location.cmi
testsuite/tools/harness.cmo : \
otherlibs/unix/unix.cmi \
utils/misc.cmi \
utils/config.cmi \
tools/byterntm.cmi \
testsuite/tools/harness.cmi
testsuite/tools/harness.cmx : \
otherlibs/unix/unix.cmx \
utils/misc.cmx \
utils/config.cmx \
tools/byterntm.cmx \
testsuite/tools/harness.cmi
testsuite/tools/harness.cmi :
testsuite/tools/harness.cmi : \
utils/misc.cmi \
utils/config.cmi \
tools/byterntm.cmi
testsuite/tools/lexcmm.cmo : \
testsuite/tools/parsecmm.cmi \
utils/misc.cmi \
Expand Down Expand Up @@ -10681,12 +10719,14 @@ testsuite/tools/parsecmmaux.cmi : \
middle_end/backend_var.cmi
testsuite/tools/testBytecodeBinaries.cmo : \
otherlibs/unix/unix.cmi \
utils/misc.cmi \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/testBytecodeBinaries.cmi
testsuite/tools/testBytecodeBinaries.cmx : \
otherlibs/unix/unix.cmx \
utils/misc.cmx \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
Expand Down Expand Up @@ -10730,13 +10770,15 @@ testsuite/tools/testRelocation.cmo : \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
bytecomp/bytelink.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 \
bytecomp/bytelink.cmx \
testsuite/tools/testRelocation.cmi
testsuite/tools/testRelocation.cmi : \
testsuite/tools/harness.cmi \
Expand Down Expand Up @@ -10790,11 +10832,13 @@ testsuite/tools/test_in_prefix.cmx : \
testsuite/tools/test_in_prefix.cmi
testsuite/tools/test_in_prefix.cmi :
testsuite/tools/test_ld_conf.cmo : \
otherlibs/unix/unix.cmi \
testsuite/tools/harness.cmi \
testsuite/tools/environment.cmi \
utils/config.cmi \
testsuite/tools/test_ld_conf.cmi
testsuite/tools/test_ld_conf.cmx : \
otherlibs/unix/unix.cmx \
testsuite/tools/harness.cmx \
testsuite/tools/environment.cmx \
utils/config.cmx \
Expand Down
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@
# the lines involved in the conflict, which is arguably worse
#/Changes merge=union

testsuite/Makefile export-subst

# Files and directories excluded from git-generated tarballs.
.github export-ignore
manual export-ignore
release-info export-ignore
testsuite/tests export-ignore
tools/ci export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.mailmap export-ignore
ocaml-variants.install export-ignore
ocaml-variants.opam export-ignore

# No header for text and META files (would be too obtrusive).
*.md typo.missing-header
README* typo.missing-header
Expand Down
50 changes: 42 additions & 8 deletions .github/workflows/build-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ jobs:
with:
script: |
// # Always test cl and clang-cl
let compilers = ['cl', 'clang-cl'];
let compilers = ['clang-cl'];
// # Also test i686 MSVC
let include = [
{cc: 'cl', arch: 'i686'}];
{os: 'windows-latest', cc: 'cl', arch: 'i686', opam: 'false', prefix: '$PROGRAMFILES/Бактріан🐫', libdir: 'relative'},
{os: 'windows-2025', cc: 'cl', arch: 'x86_64', opam: 'true', prefix: 'C:\\\\Бактріан🐫'},
{os: 'windows-2025', cc: 'cl', arch: 'i686', opam: 'true', prefix: 'C:\\\\Бактріан🐫'}];
let libdir = ['absolute'];
// # 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 @@ -52,10 +55,14 @@ jobs:
// # Test Cygwin as well
compilers.push('gcc');
// # Test bytecode-only Cygwin
include.push({cc: 'gcc', arch: 'x86_64', config_arg: '--disable-native-toplevel --disable-native-compiler'});
include.push({os: 'windows-latest', prefix: '$PROGRAMFILES/Бактріан🐫', opam: ['false'], cc: 'gcc', arch: 'x86_64', libdir: 'absolute', config_arg: '--disable-native-toplevel --disable-native-compiler'});
// # Test i686 MSVC absolute
include.push({os: 'windows-latest', prefix: '$PROGRAMFILES/Бактріан🐫', opam: ['false'], cc: 'cl', arch: 'i686', libdir: 'absolute'});
// # Expand the main matrix to include relative testing
libdir.push('relative');
}
}
return {config_arg: [''], arch: ['x86_64'], cc: compilers, include: include};
return {os: ['windows-latest'], prefix: ['$PROGRAMFILES/Бактріан🐫'], opam: ['false'], config_arg: [''], arch: ['x86_64'], cc: compilers, libdir: libdir, include: include};
- name: Determine if the testsuite should be skipped
id: skip
uses: actions/github-script@v7
Expand All @@ -73,13 +80,13 @@ jobs:
build:
permissions: {}

runs-on: windows-latest
runs-on: ${{ matrix.os }}

needs: config

timeout-minutes: ${{ matrix.cc == 'gcc' && 90 || 60 }}

name: ${{ matrix.cc == 'cl' && 'MSVC' || matrix.cc == 'gcc' && 'Cygwin' || 'clang-cl' }} ${{ matrix.arch }} ${{ matrix.config_arg != '' && format('({0})', matrix.config_arg) || '' }}
name: ${{ matrix.cc == 'cl' && 'MSVC' || matrix.cc == 'gcc' && 'Cygwin' || 'clang-cl' }} ${{ matrix.arch }} ${{ matrix.libdir }} ${{ matrix.config_arg != '' && format('({0})', matrix.config_arg) || '' }}

strategy:
matrix: ${{ fromJSON(needs.config.outputs.matrix) }}
Expand All @@ -102,7 +109,7 @@ jobs:
- name: Install Cygwin
uses: cygwin/cygwin-install-action@v3
with:
packages: make,${{ matrix.cc != 'gcc' && 'mingw64-x86_64-' || 'gcc-fortran,' }}gcc-core
packages: make,${{ matrix.cc != 'gcc' && 'mingw64-x86_64-' || 'gcc-fortran,' }}gcc-core,rsync,unzip
install-dir: 'D:\cygwin'

- name: Save Cygwin cache
Expand All @@ -118,6 +125,13 @@ jobs:
arch: ${{ matrix.arch == 'x86_64' && 'x64' || 'x86' }}
if: matrix.cc != 'gcc'

- name: Install opam
if: matrix.opam == 'true'
shell: pwsh
run: |
winget install opam --accept-source-agreements
Add-Content -Path $env:GITHUB_PATH -Value "$env:LOCALAPPDATA\Microsoft\WinGet\Links"

- name: Compute a key to cache configure results
id: autoconf-cache-key
env:
Expand All @@ -136,11 +150,14 @@ jobs:
env:
CONFIG_ARGS: >-
--cache-file=config.cache
--prefix "${{ matrix.cc != 'gcc' && '$PROGRAMFILES/Бактріан🐫' || '$(cygpath "$PROGRAMFILES/Бактріан🐫")'}}"
--prefix ${{ matrix.cc != 'gcc' && format('"{0}/_opam"', matrix.prefix) || format('"$(cygpath "{0}")"', matrix.prefix) }}
--docdir ${{ format((matrix.cc != 'gcc' && '"{0}/_opam/doc/ocaml"' || '"$(cygpath "{0}/doc/ocaml")"'), matrix.prefix) }}
${{ 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.libdir == 'relative' && '--with-relative-libdir' || '--without-relative-libdir' }}
${{ matrix.libdir == 'relative' && '--enable-runtime-search --enable-runtime-search-target=fallback' || '--disable-runtime-search --disable-runtime-search-target' }}
${{ matrix.config_arg }}
run: |
eval $(tools/msvs-promote-path)
Expand Down Expand Up @@ -193,8 +210,25 @@ jobs:
make tests

- name: Install the compiler
if: matrix.opam != 'true'
run: make install

- name: Create opam switch
if: matrix.opam == 'true'
env:
OPAMSWITCH: ${{ matrix.prefix }}
run: |
make OPAM_PACKAGE_NAME=ocaml-variants INSTALL_MODE=opam install
opam init --cli=2.4 --bare --yes --disable-sandboxing --auto-setup --cygwin-local-install
# These commands intentionally run using opam's "default" CLI
opam switch create '${{ env.OPAMSWITCH }}' --empty
opam pin add --no-action --kind=path ocaml-variants .
opam pin add --no-action flexdll flexdll
opam pin add --no-action winpthreads winpthreads
opam install --yes flexdll winpthreads
opam install --yes --assume-built ocaml-variants
opam exec -- ocamlc -v

- name: Test in prefix
run: |
eval $(tools/msvs-promote-path)
Expand Down
Loading
Loading