From b34ad9fb98cfdaedc37d0fb995fcb6465ea4a41b Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:56:26 -0700 Subject: [PATCH] Build optimized wheels by default. Don't use -O3 because it fails build --- .github/workflows/build-wheels.yml | 12 ------------ setup.py | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 27001cef7..e05ffb069 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -179,10 +179,6 @@ jobs: run: echo "CFLAGS=-O0 -g" >> $GITHUB_ENV if: ${{ inputs.optimized-or-debug == 'debug' }} - - name: Set optimized flags - run: echo "CFLAGS=-O1" >> $GITHUB_ENV - if: ${{ inputs.optimized-or-debug == 'optimized' }} - - name: Build wheel uses: pypa/cibuildwheel@v2.11.2 env: @@ -248,10 +244,6 @@ jobs: run: echo "CFLAGS=-O0 -g" >> $GITHUB_ENV if: ${{ inputs.optimized-or-debug == 'debug' }} - - name: Set optimized flags - run: echo "CFLAGS=-O1" >> $GITHUB_ENV - if: ${{ inputs.optimized-or-debug == 'optimized' }} - - name: Build wheel uses: pypa/cibuildwheel@v2.11.2 env: @@ -286,10 +278,6 @@ jobs: run: echo "CFLAGS=-O0 -g" >> $GITHUB_ENV if: ${{ inputs.optimized-or-debug == 'debug' }} - - name: Set optimized flags - run: echo "CFLAGS=-O1" >> $GITHUB_ENV - if: ${{ inputs.optimized-or-debug == 'optimized' }} - - name: Build wheel uses: pypa/cibuildwheel@v2.11.2 env: diff --git a/setup.py b/setup.py index a3d7f7219..163e2b595 100644 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ ['/usr/local/opt/openssl/include'] + \ ['aerospike-client-c/modules/common/src/include'] extra_compile_args = [ - '-std=gnu99', '-Wall', '-fPIC', '-DDEBUG', + '-std=gnu99', '-Wall', '-fPIC', '-DDEBUG', '-O1', '-fno-common', '-fno-strict-aliasing', '-Wno-strict-prototypes', '-D_FILE_OFFSET_BITS=64', '-D_REENTRANT', '-DMARCH_' + machine,