Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 885-debug-docker-fa…
Browse files Browse the repository at this point in the history
…ilure
  • Loading branch information
ober committed Sep 21, 2023
2 parents d4f209f + 57c9995 commit 2c0552e
Show file tree
Hide file tree
Showing 94 changed files with 123,655 additions and 77,769 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Parse -j from MAKEFLAGS for parallelism.
GERBIL_BUILD_CORES := $(or $(patsubst -j%,%,$(filter -j%,$(MAKEFLAGS))),1)

all: build

build:
GERBIL_BUILD_CORES=$(GERBIL_BUILD_CORES) ./build.sh
GERBIL_BUILD_FLAGS="$(MAKEFLAGS)" ./build.sh

install:
./install.sh
Expand Down
6 changes: 5 additions & 1 deletion doc/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,13 @@ cd into the `gerbil` directory.
Gerbil takes quite a while to compile, if you wish it to build faster
by utilizing multiple cores, you can:
```
make -j <number-of-cores>
make -j<number-of-cores>
```

Alternatively, you can set the `GERBIL_BUILD_CORES` environment
variable to the number of cores you want to use.


If you are using the default configuration, you can build Gerbil simply with:
```bash
$ ./configure && make && sudo make install
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ ENV GERBIL_GCC=g++
RUN cd /opt && eval git clone -b "${branch}" "https://github.com/${repo}" gerbil-src \
&& cd /opt/gerbil-src && eval ./configure --prefix=/opt/gerbil --enable-shared=no ${configure_args}

RUN cd /opt/gerbil-src && make -j ${GERBIL_BUILD_CORES} && make install
RUN cd /opt/gerbil-src && make && make install

FROM gerbil as final
RUN rm -rf /opt/gerbil-src /src/leveldb /src/lmdb
Expand Down
1 change: 0 additions & 1 deletion src/bootstrap/gerbil/compiler/base.ssxi.ss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package: gerbil/compiler
gxc#symbol-table-bindings-set!
(@struct-setf gxc#symbol-table::t 1 #f))
(declare-type gxc#symbol-table:::init! (@lambda 1 #f))
(declare-method gxc#symbol-table::t :init! gxc#symbol-table:::init! #f)
(declare-type gxc#raise-compile-error (@lambda (2) #f))
(declare-type gxc#verbose (@lambda (0) #f))
(declare-type gxc#module-id->path-string (@lambda 1 #f)))
132 changes: 88 additions & 44 deletions src/bootstrap/gerbil/compiler/base__0.scm
Original file line number Diff line number Diff line change
@@ -1,58 +1,89 @@
(declare (block) (standard-bindings) (extended-bindings))
(begin
(define gerbil/compiler/base::timestamp 1695199291)
(define gerbil/compiler/base::timestamp 1695292405)
(begin
(define gxc#current-compile-symbol-table (make-parameter '#f))
(define gxc#current-compile-runtime-sections (make-parameter '#f))
(define gxc#current-compile-runtime-names (make-parameter '#f))
(define gxc#current-compile-output-dir (make-parameter '#f))
(define gxc#current-compile-invoke-gsc (make-parameter '#f))
(define gxc#current-compile-gsc-options (make-parameter '#f))
(define gxc#current-compile-keep-scm (make-parameter '#f))
(define gxc#current-compile-verbose (make-parameter '#f))
(define gxc#current-compile-optimize (make-parameter '#f))
(define gxc#current-compile-debug (make-parameter '#f))
(define gxc#current-compile-generate-ssxi (make-parameter '#f))
(define gxc#current-compile-static (make-parameter '#f))
(define gxc#current-compile-timestamp (make-parameter '#f))
(define gxc#current-compile-decls (make-parameter '#f))
(define gxc#current-compile-symbol-table
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-runtime-sections
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-runtime-names
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-output-dir
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-invoke-gsc
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-gsc-options
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-keep-scm
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-verbose
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-optimize
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-debug
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-generate-ssxi
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-static
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-timestamp
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#current-compile-decls
(let () (declare (not safe)) (make-parameter '#f)))
(define gxc#symbol-table::t
(make-struct-type
'gxc#symbol-table::t
'#f
'2
'symbol-table
'()
':init!
'(gensyms bindings)))
(define gxc#symbol-table? (make-struct-predicate gxc#symbol-table::t))
(let ()
(declare (not safe))
(make-struct-type
'gxc#symbol-table::t
'#f
'2
'symbol-table
'()
':init!
'(gensyms bindings))))
(define gxc#symbol-table?
(let ()
(declare (not safe))
(make-struct-predicate gxc#symbol-table::t)))
(define gxc#make-symbol-table
(lambda _$args534_
(apply make-struct-instance gxc#symbol-table::t _$args534_)))
(define gxc#symbol-table-gensyms
(make-struct-field-accessor gxc#symbol-table::t '0))
(let ()
(declare (not safe))
(make-struct-field-accessor gxc#symbol-table::t '0)))
(define gxc#symbol-table-bindings
(make-struct-field-accessor gxc#symbol-table::t '1))
(let ()
(declare (not safe))
(make-struct-field-accessor gxc#symbol-table::t '1)))
(define gxc#symbol-table-gensyms-set!
(make-struct-field-mutator gxc#symbol-table::t '0))
(let ()
(declare (not safe))
(make-struct-field-mutator gxc#symbol-table::t '0)))
(define gxc#symbol-table-bindings-set!
(make-struct-field-mutator gxc#symbol-table::t '1))
(let ()
(declare (not safe))
(make-struct-field-mutator gxc#symbol-table::t '1)))
(define gxc#symbol-table:::init!
(lambda (_self532_)
(if (let ((__tmp4751
(if (let ((__tmp4753
(let () (declare (not safe)) (##vector-length _self532_))))
(declare (not safe))
(##fx< '2 __tmp4751))
(##fx< '2 __tmp4753))
(begin
(let ((__tmp4752 (make-table 'test: eq?)))
(let ((__tmp4751
(let () (declare (not safe)) (make-table 'test: eq?))))
(declare (not safe))
(##vector-set! _self532_ '1 __tmp4752))
(let ((__tmp4753 (make-table 'test: eq?)))
(##vector-set! _self532_ '1 __tmp4751))
(let ((__tmp4752
(let () (declare (not safe)) (make-table 'test: eq?))))
(declare (not safe))
(##vector-set! _self532_ '2 __tmp4753)))
(##vector-set! _self532_ '2 __tmp4752)))
(error '"struct-instance-init!: too many arguments for struct"
_self532_))))
(bind-method! gxc#symbol-table::t ':init! gxc#symbol-table:::init! '#f)
(let ()
(declare (not safe))
(bind-method! gxc#symbol-table::t ':init! gxc#symbol-table:::init! '#f))
(define gxc#raise-compile-error
(lambda (_message406_ _stx407_ . _details408_)
(apply gx#raise-syntax-error
Expand All @@ -69,18 +100,31 @@
(define gxc#module-id->path-string
(lambda (_id386_)
(let* ((_str388_
(if (symbol? _id386_) (symbol->string _id386_) _id386_))
(_len390_ (string-length _str388_))
(_res392_ (make-string _len390_)))
(if (let () (declare (not safe)) (symbol? _id386_))
(let () (declare (not safe)) (symbol->string _id386_))
_id386_))
(_len390_
(let () (declare (not safe)) (string-length _str388_)))
(_res392_ (let () (declare (not safe)) (make-string _len390_))))
(let _lp395_ ((_i397_ '0))
(if (fx< _i397_ _len390_)
(let* ((_char399_ (string-ref _str388_ _i397_))
(let* ((_char399_
(let ()
(declare (not safe))
(string-ref _str388_ _i397_)))
(_xchar401_
(if (string-index
gxc#module-path-reserved-chars
_char399_)
(if (let ()
(declare (not safe))
(string-index
gxc#module-path-reserved-chars
_char399_))
'#\_
_char399_)))
(string-set! _res392_ _i397_ _xchar401_)
(_lp395_ (fx+ _i397_ '1)))
(let ()
(declare (not safe))
(string-set! _res392_ _i397_ _xchar401_))
(let ((__tmp4754
(let () (declare (not safe)) (fx+ _i397_ '1))))
(declare (not safe))
(_lp395_ __tmp4754)))
_res392_)))))))
Loading

0 comments on commit 2c0552e

Please sign in to comment.