kubernetes-csi / csi-release-tools

shared build and test files used by kubernetes-csi projects
Apache License 2.0
21 stars 71 forks source link

support customized LDFLAGS in image build #190

Closed andyzhangx closed 2 years ago

andyzhangx commented 2 years ago

would like to add more info in LDFLAGS in image build

k8s-ci-robot commented 2 years ago

@andyzhangx: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andyzhangx To complete the pull request process, please assign jsafrane after the PR has been reviewed. You can assign the PR to them by writing /assign @jsafrane in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-csi/csi-release-tools/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
xing-yang commented 2 years ago

/assign @pohly

pohly commented 2 years ago

How is this meant to be used? During manually triggered image builds? When and why are those needed?

pohly commented 2 years ago

You know that "make EXT_LDFLAGS=..." overrides the values in the Makefile?

andyzhangx commented 2 years ago

You know that "make EXT_LDFLAGS=..." overrides the values in the Makefile?

@pohly if I define LDFLAGS in csi driver's Makefile, will it overiride? e.g. https://github.com/kubernetes-csi/csi-driver-nfs/blob/master/Makefile#L31

I think there are some specific requirements in csi driver to override the default values in csi-release-tools.

andyzhangx commented 2 years ago

/retest

pohly commented 2 years ago

if I define LDFLAGS in csi driver's Makefile, will it overiride?

The last value is the one that gets used. So first build.make sets its value, then Makefile can override it. So what you have right now in your Makefile should work. Are you seeing something different?