Skip to content

Commit

Permalink
perf: add x86 optimization CFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed Mar 30, 2020
1 parent 8596a95 commit cdf4de3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ GO_VERSION=1.13
REGISTRY=index.alauda.cn/alaudak8s
DEV_TAG=dev
RELEASE_TAG=$(shell cat VERSION)
OVS_TAG=200330

.PHONY: build-dev-images build-go build-bin lint up down halt suspend resume kind-init kind-init-ha kind-reload push-dev push-release e2e ut

Expand All @@ -21,7 +22,7 @@ build-go:
CGO_ENABLED=0 GOOS=linux go build -o $(PWD)/dist/images/kube-ovn-pinger -ldflags "-w -s" -v ./cmd/pinger

ovs:
docker build -t ovs:latest -f dist/ovs/Dockerfile dist/ovs/
docker build -t ovs:${OVS_TAG} -f dist/ovs/Dockerfile dist/ovs/

release: lint build-go
docker build -t ${REGISTRY}/kube-ovn:${RELEASE_TAG} -f dist/images/Dockerfile dist/images/
Expand Down
2 changes: 1 addition & 1 deletion dist/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ovs:latest
FROM ovs:200330

RUN mkdir -p /var/run/openvswitch && \
mkdir -p /var/run/ovn && \
Expand Down
4 changes: 2 additions & 2 deletions dist/ovs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ curl https://github.com/alauda/ovs/commit/238003290766808ba310e1875157b3d4142456
sed -i 's/2.13.1/2.13.0/g' configure.ac
sed -i 's/sphinx-build-3/sphinx-build/g' rhel/openvswitch-fedora.spec.in
./boot.sh
./configure LIBS=-ljemalloc
./configure LIBS=-ljemalloc CFLAGS="-O2 -g -msse4.2 -mpopcnt"
make rpm-fedora
cd ..

Expand All @@ -26,5 +26,5 @@ cd ovn
curl https://github.com/alauda/ovn/commit/19e802b80c866089af8f7a21512f68decc75a874.patch | git apply
sed -i 's/20.03.1/20.03.0/g' configure.ac
./boot.sh
./configure LIBS=-ljemalloc --with-ovs-source=/ovs
./configure LIBS=-ljemalloc CFLAGS="-O2 -g -msse4.2 -mpopcnt" --with-ovs-source=/ovs
make rpm-fedora

0 comments on commit cdf4de3

Please sign in to comment.