Skip to content

Commit

Permalink
Only patch flexdll on Windows.
Browse files Browse the repository at this point in the history
+ Rename Diskuv OCaml to DkML

Part of diskuv/dkml-installer-ocaml#80
  • Loading branch information
Jonah Beckford committed Nov 27, 2023
1 parent 6df75cc commit 09bc489
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ that can take the "mlcross" Opam directory structure and add it to

## Developing

First run `with-dkml make local-install` on Diskuv OCaml on Windows, or
First run `with-dkml make local-install` on DkML on Windows, or
`make local-install` on other platforms, to install the compiler in
a local opam switch using an in-place build.

Expand Down
2 changes: 1 addition & 1 deletion env/standard-compiler-env-to-ocaml-configure-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# Generally the variables conform to the description in
# https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html.
# The compiler will have been chosen from:
# a) find the compiler selected/validated in the Diskuv OCaml installation
# a) find the compiler selected/validated in the DkML installation
# (Windows) or on first-use (Unix)
# b) the specific architecture that has been given in DKML_TARGET_ABI
#
Expand Down
8 changes: 4 additions & 4 deletions src/r-c-ocaml-1-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# ----------------------------
#
# @jonahbeckford: 2021-10-26
# - This file is licensed differently than the rest of the Diskuv OCaml distribution.
# - This file is licensed differently than the rest of the DkML distribution.
# Keep the Apache License in this file since this file is part of the reproducible
# build files.
#
Expand Down Expand Up @@ -158,7 +158,7 @@ usage() {
printf "%s\n" " Defaults to '$OPT_MSVS_PREFERENCE' which, because it does not include '@',"
printf "%s\n" " will not choose a compiler based on environment variables that would disrupt reproducibility."
printf "%s\n" " Confer with https://github.com/metastack/msvs-tools#msvs-detect"
printf "%s\n" " -e DKMLHOSTABI: Optional. Use the Diskuv OCaml compiler detector find a host ABI compiler."
printf "%s\n" " -e DKMLHOSTABI: Optional. Use the DkML compiler detector find a host ABI compiler."
printf "%s\n" " Especially useful to find a 32-bit Windows host compiler that can use 64-bits of memory for the compiler."
printf "%s\n" " Values include: windows_x86, windows_x86_64, android_arm64v8a, darwin_x86_64, etc."
printf "%s\n" " Others are/will be documented on https://diskuv.gitlab.io/diskuv-ocaml. Defaults to an"
Expand Down Expand Up @@ -769,7 +769,7 @@ BUILD_CROSS_ARGS+=( -s "$_OCAMLVER" )

# Find and apply patches to the host ABI
apply_patches "$OCAMLSRC_UNIX" ocaml "$_OCAMLVER" host
if [ -e "$OCAMLSRC_UNIX"/flexdll/Makefile ]; then
if [ -e "$OCAMLSRC_UNIX"/flexdll/Makefile ] && is_unixy_windows_build_machine; then
apply_patches "$OCAMLSRC_UNIX/flexdll" flexdll "$_FLEXDLLVER" host
fi

Expand All @@ -794,7 +794,7 @@ else
get_ocaml_source "$GIT_COMMITID_TAG_OR_DIR" "$_srcabidir_unix" "$TARGETDIR_MIXED/$CROSS_SUBDIR/$_targetabi/$HOSTSRC_SUBDIR" "$_targetabi"
# Find and apply patches to the target ABI
apply_patches "$_srcabidir_unix" ocaml "$_OCAMLVER" cross
if [ -e "$_srcabidir_unix"/flexdll/Makefile ]; then
if [ -e "$_srcabidir_unix"/flexdll/Makefile ] && is_unixy_windows_build_machine; then
apply_patches "$_srcabidir_unix/flexdll" flexdll "$_FLEXDLLVER" cross
fi
done < "$WORK"/tabi
Expand Down
2 changes: 1 addition & 1 deletion src/r-c-ocaml-2-build_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ usage() {
printf "%s\n" " -t DIR: Target directory for the reproducible directory tree"
printf "%s\n" " -b PREF: Required and used only for the MSVC compiler. See r-c-ocaml-1-setup.sh"
printf "%s\n" " -c OCAMLC_OPT_EXE: If a possibly older 'ocamlc.opt' is specified, it speeds up compilation of the new OCaml compiler"
printf "%s\n" " -e DKMLHOSTABI: Uses the Diskuv OCaml compiler detector find a host ABI compiler"
printf "%s\n" " -e DKMLHOSTABI: Uses the DkML compiler detector find a host ABI compiler"
printf "%s\n" " -f HOSTSRC_SUBDIR: Use HOSTSRC_SUBDIR subdirectory of -t DIR to place the source code of the host ABI"
printf "%s\n" " -p HOST_SUBDIR: Optional. Use HOST_SUBDIR subdirectory of -t DIR to place the host ABI"
printf "%s\n" " -k HOSTABISCRIPT: Optional. See r-c-ocaml-1-setup.sh"
Expand Down
4 changes: 2 additions & 2 deletions src/r-c-ocaml-3-build_cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# ----------------------------
#
# @jonahbeckford: 2021-10-26
# - This file is licensed differently than the rest of the Diskuv OCaml distribution.
# - This file is licensed differently than the rest of the DkML distribution.
# Keep the Apache License in this file since this file is part of the reproducible
# build files.
#
Expand Down Expand Up @@ -61,7 +61,7 @@ usage() {
printf "%s\n" " -d DIR: DKML directory containing a .dkmlroot file"
printf "%s\n" " -t DIR: Target directory for the reproducible directory tree"
printf "%s\n" " -a TARGETABIS: Optional. See r-c-ocaml-1-setup.sh"
printf "%s\n" " -e DKMLHOSTABI: Uses the Diskuv OCaml compiler detector find a host ABI compiler"
printf "%s\n" " -e DKMLHOSTABI: Uses the DkML compiler detector find a host ABI compiler"
printf "%s\n" " -f HOSTSRC_SUBDIR: Use HOSTSRC_SUBDIR subdirectory of -t DIR to place the source code of the host ABI"
printf "%s\n" " -g CROSS_SUBDIR: Use CROSS_SUBDIR subdirectory of -t DIR to place target ABIs"
printf "%s\n" " -l FLEXLINKFLAGS: Options added to flexlink while building ocaml, ocamlc, etc. native Windows executables"
Expand Down
2 changes: 1 addition & 1 deletion src/r-c-ocaml-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# ----------------------------
#
# @jonahbeckford: 2021-10-26
# - This file is licensed differently than the rest of the Diskuv OCaml distribution.
# - This file is licensed differently than the rest of the DkML distribution.
# Keep the Apache License in this file since this file is part of the reproducible
# build files.
#
Expand Down

0 comments on commit 09bc489

Please sign in to comment.