Skip to content

Commit 20a4cb6

Browse files
whatever
PiperOrigin-RevId: 614416114
1 parent 3b97692 commit 20a4cb6

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
1515
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
16-
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
1716
load("@bazel_tools//tools/build_defs/license:license.bzl", "license")
17+
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
1818

1919
package(default_applicable_licenses = ["//:license"])
2020

elfconvert.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,28 @@ case $SAR_ARGV0 in
1111
*) sbcl_subdir=k8
1212
esac
1313
sbcl=$RUNFILES/google3/third_party/lisp/sbcl/binary-distribution/$sbcl_subdir/bin/sbcl
14-
args=(--noinform --dynamic-space-size 512MB)
14+
args=(--noinform --dynamic-space-size 1GB)
1515
mode='(setq *evaluator-mode* :compile)'
1616
script=$RUNFILES/google3/third_party/lisp/sbcl/src/tools-for-build/elftool
1717

1818
action=$1
1919
input=$2
2020
output=$3
2121

22+
compactcore=/tmp/compact-$$.core
23+
tmpcore=/tmp/patched-$$.core
24+
DSS=16384
25+
2226
case $action in
2327
split)
24-
exec $sbcl ${args[@]} --eval "$mode" --load $script --eval \
25-
'(sb-editcore:split-core "'$input'" "'$output'")' --quit ;;
28+
exec $sbcl ${args[@]} --eval "$mode" --load $script \
29+
--eval '(sb-editcore:reorganize-core "'$input'" "'$compactcore'")' \
30+
--eval '(sb-editcore:move-dynamic-code-to-text-space "'$compactcore'" "'$tmpcore'")' \
31+
--eval '(delete-file "'$compactcore'")' \
32+
--eval '(sb-editcore:redirect-text-space-calls "'$tmpcore'")' \
33+
--eval '(sb-editcore:split-core "'$tmpcore'" "'$output'" :dynamic-space-size '$DSS')' \
34+
--eval '(delete-file "'$tmpcore'")' --quit ;;
35+
2636
copy)
2737
exec $sbcl ${args[@]} --eval "$mode" --load $script --eval \
2838
'(sb-editcore::copy-to-elf-obj "'$input'" "'$output'")' --quit ;;

rule-tests/BUILD

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
2+
load(
3+
"//:rules.bzl",
4+
"lisp_binary",
5+
"lisp_library",
6+
"lisp_test",
7+
)
28
load(
39
":tests.bzl",
410
"DYNSPACE",
@@ -12,12 +18,6 @@ load(
1218
"lisp_instrumented_files_info_test",
1319
"lisp_providers_test",
1420
)
15-
load(
16-
"//:rules.bzl",
17-
"lisp_binary",
18-
"lisp_library",
19-
"lisp_test",
20-
)
2121

2222
package(default_applicable_licenses = ["//:license"])
2323

rules.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ The three rules defined here are:
1212
lisp_test - Outputs a binary that is run with the test command
1313
"""
1414

15-
load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain", "use_cc_toolchain")
1615
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
16+
load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain", "use_cc_toolchain")
1717
load(
1818
":provider.bzl",
1919
"LispInfo",

0 commit comments

Comments
 (0)