Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Secure solution for nexus infrastructure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flg_masters
TM
Secure solution for nexus infrastructure
Commits
9a299934
Commit
9a299934
authored
May 16, 2023
by
Florent Gluck
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes to build flags
parent
1c78d887
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+3
-0
3 additions, 0 deletions
Makefile
src/client/common.mk
+6
-5
6 additions, 5 deletions
src/client/common.mk
with
9 additions
and
5 deletions
Makefile
+
3
−
0
View file @
9a299934
...
...
@@ -65,6 +65,9 @@ clean_certs:
#-------------------------------------------------------------------------
# To build a static executable:
# CGO_ENABLED=0 go build
build
:
@
echo
"[Building nexus-server]"
@
cd
src/server
&&
go build
-a
.
...
...
This diff is collapsed.
Click to expand it.
src/client/common.mk
+
6
−
5
View file @
9a299934
#build_flags=build -a
build_flags
=
build
#static_flags=-ldflags '-w -extldflags "-static"'
static_flags
=
# To force a full recompile:
# build_flags=build -a
# To build a static executable:
# CGO_ENABLED=0 go build
OSES
=
linux windows darwin
ARCHES
=
amd64 arm64 386
CA_CERT_NAME
=
ca-cert.pem
...
...
@@ -54,7 +55,7 @@ build_dev: build_dir prepare_dev build
build
:
@
echo
"[Building for
$(
OS
)
$(
ARCH
)
]"
;
\
if
[
$(
OS
)
=
"linux"
]
;
then
\
GOARCH
=
$(
ARCH
)
GOOS
=
$(
OS
)
CGO_ENABLED
=
0 go
$(
build_flags
)
$(
static_flags
)
-o
build/
$(
ARCH
)
/
$(
OS
)
/
;
\
GOARCH
=
$(
ARCH
)
GOOS
=
$(
OS
)
CGO_ENABLED
=
0 go
$(
build_flags
)
-o
build/
$(
ARCH
)
/
$(
OS
)
/
;
\
strip
-s
build/
$(
ARCH
)
/
$(
OS
)
/
$(
bin
)
;
\
#upx build/
$(
ARCH
)
/
$(
OS
)
/
$(
bin
)
;
\
else
\
...
...
@@ -74,7 +75,7 @@ build_all:
mkdir
-p
build/
$$
arch
/
$$
os
;
\
echo
"[Building for
$$
os
$$
arch]"
;
\
if
[
$$
os
=
"linux"
]
;
then
\
GOARCH
=
$$
arch
GOOS
=
$$
os
CGO_ENABLED
=
0 go
$(
build_flags
)
$(
static_flags
)
-o
build/
$$
arch
/
$$
os/
;
\
GOARCH
=
$$
arch
GOOS
=
$$
os
CGO_ENABLED
=
0 go
$(
build_flags
)
-o
build/
$$
arch
/
$$
os/
;
\
strip
-s
build/
$$
arch
/
$$
os/
$(
bin
)
;
\
#upx build/$$arch/$$os/
$(
bin
)
;
\
else
\
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment