Skip to content

Commit

Permalink
whatever
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 614416114
  • Loading branch information
common-lisp-dev-copybara authored and copybara-github committed Mar 29, 2024
1 parent 3b97692 commit 82752a8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
load("@bazel_tools//tools/build_defs/license:license.bzl", "license")
load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")

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

Expand Down
16 changes: 13 additions & 3 deletions elfconvert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,28 @@ case $SAR_ARGV0 in
*) sbcl_subdir=k8
esac
sbcl=$RUNFILES/google3/third_party/lisp/sbcl/binary-distribution/$sbcl_subdir/bin/sbcl
args=(--noinform --dynamic-space-size 512MB)
args=(--noinform --dynamic-space-size 1GB)
mode='(setq *evaluator-mode* :compile)'
script=$RUNFILES/google3/third_party/lisp/sbcl/src/tools-for-build/elftool

action=$1
input=$2
output=$3

compactcore=/tmp/compact-$$.core
tmpcore=/tmp/patched-$$.core
DSS=16384

case $action in
split)
exec $sbcl ${args[@]} --eval "$mode" --load $script --eval \
'(sb-editcore:split-core "'$input'" "'$output'")' --quit ;;
exec $sbcl ${args[@]} --eval "$mode" --load $script \
--eval '(sb-editcore:reorganize-core "'$input'" "'$compactcore'")' \
--eval '(sb-editcore:move-dynamic-code-to-text-space "'$compactcore'" "'$tmpcore'")' \
--eval '(delete-file "'$compactcore'")' \
--eval '(sb-editcore:redirect-text-space-calls "'$tmpcore'")' \
--eval '(sb-editcore:split-core "'$tmpcore'" "'$output'" :dynamic-space-size '$DSS')' \
--eval '(delete-file "'$tmpcore'")' --quit ;;

copy)
exec $sbcl ${args[@]} --eval "$mode" --load $script --eval \
'(sb-editcore::copy-to-elf-obj "'$input'" "'$output'")' --quit ;;
Expand Down
12 changes: 6 additions & 6 deletions rule-tests/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(
"//:rules.bzl",
"lisp_binary",
"lisp_library",
"lisp_test",
)
load(
":tests.bzl",
"DYNSPACE",
Expand All @@ -12,12 +18,6 @@ load(
"lisp_instrumented_files_info_test",
"lisp_providers_test",
)
load(
"//:rules.bzl",
"lisp_binary",
"lisp_library",
"lisp_test",
)

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

Expand Down
2 changes: 1 addition & 1 deletion rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ The three rules defined here are:
lisp_test - Outputs a binary that is run with the test command
"""

load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain", "use_cc_toolchain")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@rules_cc//cc:find_cc_toolchain.bzl", "find_cc_toolchain", "use_cc_toolchain")
load(
":provider.bzl",
"LispInfo",
Expand Down

0 comments on commit 82752a8

Please sign in to comment.