Skip to content

Commit 4f44650

Browse files
authored
flambda-backend: Revert "Rename extension otherlibs" (#2579)
Revert "Rename extension otherlibs (#2564)" This reverts commit 2207eb1.
1 parent 150dc14 commit 4f44650

34 files changed

+21
-275
lines changed

Makefile.common-jst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,15 @@ install_for_test: _install
251251
ln -s . lex; ln -s . yacc; \
252252
ln -s _install/lib/ocaml/compiler-libs compilerlibs; \
253253
mkdir -p otherlibs/{unix,dynlink/native,str,bigarray,runtime_events}; \
254+
mkdir -p otherlibs/{upstream_compatible,stable,beta,alpha}; \
254255
ln -s ../stdlib/threads otherlibs/systhreads$(RUNTIME_SUFFIX); \
255256
$(cpl) stdlib/unix/{lib,}unix* otherlibs/unix; \
256257
$(cpl) stdlib/dynlink/dynlink* otherlibs/dynlink; \
257258
$(cpl) stdlib/str/{lib,}str* otherlibs/str; \
258-
for universe in upstream_compatible stable beta alpha ; do \
259-
mkdir -p otherlibs/{stdlib_,}$${universe}; \
260-
$(cpl) stdlib/stdlib_$${universe}/* otherlibs/stdlib_$${universe}; \
261-
$(cpl) stdlib/$${universe}/* otherlibs/$${universe}; \
262-
done; \
259+
$(cpl) stdlib/upstream_compatible/* otherlibs/upstream_compatible; \
260+
$(cpl) stdlib/stable/* otherlibs/stable; \
261+
$(cpl) stdlib/beta/* otherlibs/beta; \
262+
$(cpl) stdlib/alpha/* otherlibs/alpha; \
263263
if [[ x"$(RUNTIME_DIR)" = x"runtime" ]]; then \
264264
$(cpl) stdlib/runtime_events/{lib,}runtime_events* otherlibs/runtime_events; \
265265
fi; \

ocamltest/ocaml_modifiers.ml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,18 @@ let dynlink =
9393
let str = make_library_modifier
9494
"str" [compiler_subdir ["otherlibs"; "str"]]
9595

96+
let upstream_compatible = make_library_modifier
97+
"upstream_compatible" [compiler_subdir ["otherlibs"; "upstream_compatible"]]
98+
99+
let stable = make_library_modifier
100+
"stable" [compiler_subdir ["otherlibs"; "stable"]]
101+
102+
let beta = make_library_modifier
103+
"beta" [compiler_subdir ["otherlibs"; "beta"]]
104+
105+
let alpha = make_library_modifier
106+
"alpha" [compiler_subdir ["otherlibs"; "alpha"]]
107+
96108
let systhreads =
97109
unix @
98110
(make_library_modifier
@@ -128,28 +140,17 @@ let runtime_suffix = if Config.runtime5 then "" else "4"
128140

129141
let debugger = [add_compiler_subdir ("debugger" ^ runtime_suffix)]
130142

131-
let extension_universe_lib name =
132-
make_library_modifier name [compiler_subdir ["otherlibs"; name]]
133-
134143
let _ =
135144
register_modifiers "principal" principal;
136145
register_modifiers "config" config;
137146
register_modifiers "testing" testing;
138147
register_modifiers "unix" unix;
139148
register_modifiers "dynlink" dynlink;
140149
register_modifiers "str" str;
141-
List.iter
142-
(fun old_name ->
143-
let new_name = "stdlib_" ^ old_name in
144-
register_modifiers old_name (extension_universe_lib old_name);
145-
register_modifiers new_name (extension_universe_lib new_name);
146-
)
147-
[
148-
"upstream_compatible";
149-
"stable";
150-
"beta";
151-
"alpha";
152-
];
150+
register_modifiers "upstream_compatible" upstream_compatible;
151+
register_modifiers "stable" stable;
152+
register_modifiers "beta" beta;
153+
register_modifiers "alpha" alpha;
153154
List.iter
154155
(fun archive -> register_modifiers archive (compilerlibs_archive archive))
155156
[
File renamed without changes.
File renamed without changes.

otherlibs/alpha/dune

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
;* *
1313
;**************************************************************************
1414

15-
;; [alpha] was renamed to [stdlib_alpha]. This library clones [stdlib_alpha]
16-
;; until we move all existing uses of [alpha] to [stdlib_alpha].
17-
1815
(library
1916
(name alpha)
2017
(wrapped false)
@@ -37,17 +34,6 @@
3734
(library_flags
3835
(:standard -linkall)))
3936

40-
;; We clone files from [stdlib_alpha] instead of re-exporting the library
41-
;; to avoid adding a new transitive dependency to builds.
42-
43-
(rule
44-
(deps
45-
(glob_files ../stdlib_alpha/*.{ml,mli}))
46-
(targets alpha.ml alpha.mli)
47-
(action
48-
(bash
49-
"cp ../stdlib_alpha/*.{ml,mli} .; mv stdlib_alpha.ml alpha.ml; mv stdlib_alpha.mli alpha.mli")))
50-
5137
(install
5238
(files
5339
(glob_files
File renamed without changes.
File renamed without changes.

otherlibs/beta/dune

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
;* *
1313
;**************************************************************************
1414

15-
;; [beta] was renamed to [stdlib_beta]. This library clones [stdlib_beta]
16-
;; until we move all existing uses of [beta] to [stdlib_beta].
17-
1815
(library
1916
(name beta)
2017
(wrapped false)
@@ -37,17 +34,6 @@
3734
(library_flags
3835
(:standard -linkall)))
3936

40-
;; We clone files from [stdlib_beta] instead of re-exporting the library
41-
;; to avoid adding a new transitive dependency to builds.
42-
43-
(rule
44-
(deps
45-
(glob_files ../stdlib_beta/*.{ml,mli}))
46-
(targets float32.ml float32.mli float32_u.ml float32_u.mli beta.ml beta.mli)
47-
(action
48-
(bash
49-
"cp ../stdlib_beta/*.{ml,mli} .; mv stdlib_beta.ml beta.ml; mv stdlib_beta.mli beta.mli")))
50-
5137
(install
5238
(files
5339
(glob_files
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

otherlibs/stable/dune

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
;* *
1313
;**************************************************************************
1414

15-
;; [stable] was renamed to [stdlib_stable]. This library clones [stdlib_stable]
16-
;; until we move all existing uses of [stable] to [stdlib_stable].
17-
1815
(library
1916
(name stable)
2017
(wrapped false)
@@ -37,27 +34,6 @@
3734
(library_flags
3835
(:standard -linkall)))
3936

40-
;; We clone files from [stdlib_stable] instead of re-exporting the library
41-
;; to avoid adding a new transitive dependency to builds.
42-
43-
(rule
44-
(deps
45-
(glob_files ../stdlib_stable/*.{ml,mli}))
46-
(targets
47-
float_u.ml
48-
float_u.mli
49-
int32_u.ml
50-
int32_u.mli
51-
int64_u.ml
52-
int64_u.mli
53-
nativeint_u.ml
54-
nativeint_u.mli
55-
stable.ml
56-
stable.mli)
57-
(action
58-
(bash
59-
"cp ../stdlib_stable/*.{ml,mli} .; mv stdlib_stable.ml stable.ml; mv stdlib_stable.mli stable.mli")))
60-
6137
(install
6238
(files
6339
(glob_files
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

otherlibs/stdlib_alpha/dune

Lines changed: 0 additions & 46 deletions
This file was deleted.

otherlibs/stdlib_beta/dune

Lines changed: 0 additions & 46 deletions
This file was deleted.

otherlibs/stdlib_stable/dune

Lines changed: 0 additions & 46 deletions
This file was deleted.

otherlibs/stdlib_upstream_compatible/dune

Lines changed: 0 additions & 50 deletions
This file was deleted.

otherlibs/upstream_compatible/dune

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
;* *
1313
;**************************************************************************
1414

15-
;; [upstream_compatible] was renamed to [stdlib_upstream_compatible].
16-
;; This library clones [stdlib_upstream_compatible] until we move all
17-
;; existing uses of [upstream_compatible] to [stdlib_upstream_compatible].
18-
1915
(library
2016
(name upstream_compatible)
2117
(wrapped false)
@@ -38,17 +34,6 @@
3834
(library_flags
3935
(:standard -linkall)))
4036

41-
;; We clone files from [stdlib_upstream_compatible] instead of re-exporting the library
42-
;; to avoid adding a new transitive dependency to builds.
43-
44-
(rule
45-
(deps
46-
(glob_files ../stdlib_upstream_compatible/*.{ml,mli}))
47-
(targets upstream_compatible.ml upstream_compatible.mli)
48-
(action
49-
(bash
50-
"cp ../stdlib_upstream_compatible/*.{ml,mli} .; mv stdlib_upstream_compatible.ml upstream_compatible.ml; mv stdlib_upstream_compatible.mli upstream_compatible.mli")))
51-
5237
(install
5338
(files
5439
(glob_files

0 commit comments

Comments
 (0)