Skip to content

Commit

Permalink
fix(cdsctl): set CGO_ENABLED=0 for nokeychain variant (#6891)
Browse files Browse the repository at this point in the history
Signed-off-by: francois.samin <[email protected]>
  • Loading branch information
fsamin authored Mar 12, 2024
1 parent 1c424e2 commit 98bbde6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/cdsctl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ clean:

$(TARGET_BINARIES):
$(info *** building binary $@)
@$(MAKE) --no-print-directory gobuild TAGS='' GOOS=$(call get_os_from_binary_file,$@) GOARCH=$(call get_arch_from_binary_file,$@) OUTPUT=$@
@$(MAKE) --no-print-directory gobuild TAGS='' CGO_ENABLED=1 GOOS=$(call get_os_from_binary_file,$@) GOARCH=$(call get_arch_from_binary_file,$@) OUTPUT=$@

$(TARGET_BINARIES_VARIANT):
$(info *** building binary variant $@)
@$(MAKE) --no-print-directory gobuild TAGS="--tags='nokeychain'" GOOS=$(call get_os_from_binary_file,$(subst -nokeychain,,$@)) GOARCH=$(call get_arch_from_binary_file,$(subst -nokeychain,,$@)) OUTPUT=$@
@$(MAKE) --no-print-directory gobuild TAGS="--tags='nokeychain'" CGO_ENABLED=0 GOOS=$(call get_os_from_binary_file,$(subst -nokeychain,,$@)) GOARCH=$(call get_arch_from_binary_file,$(subst -nokeychain,,$@)) OUTPUT=$@

gobuild:
$(info ... OS:$(GOOS) ARCH:$(GOARCH) -> $(OUTPUT))
@GOOS=$(GOOS) GOARCH=$(GOARCH) $(GO_BUILD) $(TAGS) $(TARGET_LDFLAGS) -o $(OUTPUT)
@GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=$(CGO_ENABLED) $(GO_BUILD) $(TAGS) $(TARGET_LDFLAGS) -o $(OUTPUT)

build: $(TARGET_DIR) $(TARGET_BINARIES_VARIANT) $(TARGET_BINARIES)

Expand Down

0 comments on commit 98bbde6

Please sign in to comment.