Skip to content

Commit

Permalink
Merge pull request #7927 from Agoric/mfig-build-tweaks
Browse files Browse the repository at this point in the history
build!: remove deprecated `ag-cosmos-helper`
  • Loading branch information
michaelfig authored Jun 15, 2023
2 parents f8eb1cd + 6866ebe commit f581a7e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 38 deletions.
14 changes: 4 additions & 10 deletions golang/cosmos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,12 @@ ldflags += -compressdwarf=false
gcflags += -N -l
endif

ldflags_helper = $(ldflags) \
-X github.com/cosmos/cosmos-sdk/version.AppName=ag-cosmos-helper
BUILD_FLAGS := -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags)'
BUILD_FLAGS_HELPER := -buildmode=exe -tags "$(build_tags)" -gcflags '$(gcflags)' -ldflags '$(ldflags_helper)'

all: compile-chain

compile-chain: compile-agd compile-helper compile-daemon
compile-go: compile-agd compile-helper compile-libdaemon
compile-chain: compile-agd compile-daemon
compile-go: compile-agd compile-libdaemon
compile-node: node-compile-gyp

compile-daemon: compile-libdaemon node-compile-gyp
Expand All @@ -60,20 +57,17 @@ node-compile-gyp:
fi

compile-agd: go-mod-cache
go build -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) -o build/agd ./cmd/agd
go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=exe -o build/agd ./cmd/agd

install-agd: go-mod-cache
go install -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) ./cmd/agd
go install -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=exe ./cmd/agd

# Only run from the package.json build:gyp script.
compile-gyp:
cp binding.gyp.in binding.gyp
node-gyp configure build $(GYP_DEBUG) || { status=$$?; rm -f binding.gyp; exit $$status; }
rm -f binding.gyp

compile-helper: go-mod-cache
go build -v $(MOD_READONLY) $(BUILD_FLAGS_HELPER) -o build/ag-cosmos-helper ./cmd/helper

compile-libdaemon: go-mod-cache
go build -v $(MOD_READONLY) $(BUILD_FLAGS) -buildmode=c-shared -o build/libagcosmosdaemon.so ./cmd/libdaemon/main.go

Expand Down
2 changes: 1 addition & 1 deletion golang/cosmos/binding.gyp.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
'postbuilds': [
{
'postbuild_name': 'Add prefix @rpath/<(target_lib)',
'postbuild_name': 'Adding @rpath prefix to <(target_lib)',
'action': [
'install_name_tool',
'-change',
Expand Down
21 changes: 0 additions & 21 deletions golang/cosmos/cmd/helper/main.go

This file was deleted.

6 changes: 1 addition & 5 deletions packages/cosmic-swingset/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ all: build-chain install-nobuild

client: build-helper install-nobuild

install-nobuild: install-local install-agd install-helper
install-nobuild: install-local install-agd

install: all install-nobuild

Expand Down Expand Up @@ -363,10 +363,6 @@ install-agd:
mkdir -p "$(BIN)"
ln -sf "$(SDK_ROOT)/bin/agd" "$(BIN)/agd"

install-helper:
mkdir -p "$(BIN)"
ln -sf "$(SDK_ROOT)/bin/agd" "$(BIN)/ag-cosmos-helper"

install-local:
mkdir -p "$(BIN)"
ln -sf "$(SDK_ROOT)/bin/agd" "$(BIN)/ag-chain-cosmos"
Expand Down
1 change: 0 additions & 1 deletion packages/deployment/Dockerfile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ WORKDIR /usr/src
COPY --from=build-js /usr/src/agoric-sdk agoric-sdk
COPY --from=otel /otelcol-contrib /usr/local/bin/
RUN ln -s /usr/src/agoric-sdk/bin/agd /usr/local/bin/
RUN ln -s /usr/src/agoric-sdk/bin/agd /usr/local/bin/ag-cosmos-helper
RUN ln -s /usr/src/agoric-sdk/packages/cosmic-swingset/bin/ag-chain-cosmos /usr/local/bin/
RUN ln -s /usr/src/agoric-sdk/packages/solo/bin/ag-solo /usr/local/bin/
RUN ln -s /usr/src/agoric-sdk/packages/agoric-cli/bin/agoric /usr/local/bin/
Expand Down
1 change: 1 addition & 0 deletions packages/xsnap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build:env": "if git status >/dev/null 2>&1; then node src/build.js --show-env > build.env; fi",
"build:from-env": "{ cat build.env; echo node src/build.js; } | xargs env",
"build": "yarn build:bin && yarn build:env",
"postinstall": "yarn build:from-env",
"clean": "rm -rf xsnap-native/xsnap/build",
"lint": "run-s --continue-on-error lint:*",
"lint:js": "eslint 'src/**/*.js' 'test/**/*.js' api.js",
Expand Down

0 comments on commit f581a7e

Please sign in to comment.