Skip to content

Commit 435de6d

Browse files
authored
Fix bootstrap and add legacy CI (#126)
* proper bootstrap * add legacy CI * prefix functions with caml_ * remove failing CI steps
1 parent 7e5a626 commit 435de6d

File tree

7 files changed

+61
-12
lines changed

7 files changed

+61
-12
lines changed

.github/workflows/legacy-build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: build-legacy
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
full-flambda:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
- name: Packages
12+
run: |
13+
sudo apt-get update -y && sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended
14+
# Ensure that make distclean can be run from an empty tree
15+
- name: distclean
16+
run: |
17+
MAKE_ARG=-j make distclean
18+
- name: configure tree
19+
run: |
20+
MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-flambda --enable-dependency-generation' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure
21+
- name: Build
22+
run: |
23+
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh build
24+
- name: Run the testsuite
25+
run: |
26+
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh test
27+
full-flambda-local:
28+
runs-on: ubuntu-latest
29+
env:
30+
OCAMLPARAM: "_,extension=local"
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
- name: Packages
35+
run: |
36+
sudo apt-get update -y && sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended
37+
# Ensure that make distclean can be run from an empty tree
38+
- name: distclean
39+
run: |
40+
MAKE_ARG=-j make distclean
41+
- name: configure tree
42+
run: |
43+
MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-flambda --enable-dependency-generation' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure
44+
- name: Build
45+
run: |
46+
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh build
47+
- name: Run the testsuite
48+
run: |
49+
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh test

boot/ocamlc

11.7 KB
Binary file not shown.

boot/ocamllex

0 Bytes
Binary file not shown.

runtime/backtrace_nat.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ frame_descr * caml_next_frame_descriptor(uintnat * pc, char ** sp)
4747
/* Skip to next frame */
4848
if (d->frame_size != 0xFFFF) {
4949
/* Regular frame, update sp/pc and return the frame descriptor */
50-
*sp += (get_frame_size(d) & 0xFFFFFFFC);
50+
*sp += (caml_get_frame_size(d) & 0xFFFFFFFC);
5151
*pc = Saved_return_address(*sp);
5252
#ifdef Mask_already_scanned
5353
*pc = Mask_already_scanned(*pc);
@@ -169,13 +169,13 @@ static debuginfo debuginfo_extract(frame_descr* d, int alloc_idx)
169169
/* The special frames marking the top of an ML stack chunk are never
170170
returned by caml_next_frame_descriptor, so should never reach here. */
171171
CAMLassert(d->frame_size != 0xFFFF);
172-
frame_size = get_frame_size(d);
172+
frame_size = caml_get_frame_size(d);
173173

174174
if ((frame_size & 1) == 0) {
175175
return NULL;
176176
}
177177
/* Recover debugging info */
178-
infoptr = get_end_of_live_ofs(d);
178+
infoptr = caml_get_end_of_live_ofs(d);
179179
if (frame_size & 2) {
180180
CAMLassert(alloc_idx == -1 || (0 <= alloc_idx && alloc_idx < *infoptr));
181181
/* skip alloc_lengths */

runtime/caml/stack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ typedef struct {
123123
} frame_descr_long;
124124

125125
/* Helpers for long frames */
126-
uint32_t get_frame_size(frame_descr *);
127-
unsigned char * get_end_of_live_ofs (frame_descr *d);
126+
uint32_t caml_get_frame_size(frame_descr *);
127+
unsigned char * caml_get_end_of_live_ofs (frame_descr *d);
128128

129129
/* Allocation lengths are encoded as 0-255, giving sizes 1-256 */
130130
#define Wosize_encoded_alloc_len(n) ((uintnat)(n) + 1)

runtime/roots_nat.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static link* frametables_list_tail(link *list) {
8383
/* Special marker instead of frame_size for frame_descr in long format */
8484
static uint32_t LONG_FRAME_MARKER = 0x7FFF;
8585

86-
uint32_t get_frame_size(frame_descr *d) {
86+
uint32_t caml_get_frame_size(frame_descr *d) {
8787
CAMLassert(d && d->frame_size != 0xFFFF);
8888
if (d->frame_size == LONG_FRAME_MARKER) {
8989
/* Handle long frames */
@@ -95,7 +95,7 @@ uint32_t get_frame_size(frame_descr *d) {
9595
}
9696

9797
/* Skip to end of live_ofs */
98-
unsigned char * get_end_of_live_ofs (frame_descr *d) {
98+
unsigned char * caml_get_end_of_live_ofs (frame_descr *d) {
9999
CAMLassert(d && d->frame_size != 0xFFFF);
100100
if (d->frame_size == LONG_FRAME_MARKER) {
101101
/* Handle long frames */
@@ -111,8 +111,8 @@ static frame_descr * next_frame_descr(frame_descr * d) {
111111
uint32_t frame_size;
112112
CAMLassert(d->retaddr >= 4096);
113113
if (d->frame_size != 0xFFFF) {
114-
frame_size = get_frame_size(d);
115-
p = get_end_of_live_ofs(d);
114+
frame_size = caml_get_frame_size(d);
115+
p = caml_get_end_of_live_ofs(d);
116116
/* Skip alloc_lengths if present */
117117
if (frame_size & 2) {
118118
num_allocs = *p;
@@ -688,7 +688,7 @@ void caml_do_local_roots_nat(scanning_action maj, scanning_action min,
688688
}
689689
}
690690
/* Move to next frame */
691-
sp += (get_frame_size(d) & 0xFFFFFFFC);
691+
sp += (caml_get_frame_size(d) & 0xFFFFFFFC);
692692
retaddr = Saved_return_address(sp);
693693
#ifdef Mask_already_scanned
694694
retaddr = Mask_already_scanned(retaddr);

runtime/signals_nat.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ void caml_garbage_collection(void)
7373
}
7474
/* Must be an allocation frame */
7575
CAMLassert(d && d->frame_size != 0xFFFF &&
76-
(get_frame_size(d) & 2));
76+
(caml_get_frame_size(d) & 2));
7777
}
7878

7979
/* Compute the total allocation size at this point,
8080
including allocations combined by Comballoc */
81-
alloc_len = get_end_of_live_ofs(d);
81+
alloc_len = caml_get_end_of_live_ofs(d);
8282
nallocs = *alloc_len++;
8383

8484
if (nallocs == 0) {

0 commit comments

Comments
 (0)