diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index d31f9aedc9..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,41 +0,0 @@ -version: '{build}' - -environment: - matrix: - - MSYSTEM: MINGW64 - CPU: x86_64 - MSVC: amd64 - CONFIG_FLAGS: --enable-debug - - MSYSTEM: MINGW64 - CPU: x86_64 - CONFIG_FLAGS: --enable-debug - - MSYSTEM: MINGW32 - CPU: i686 - MSVC: x86 - CONFIG_FLAGS: --enable-debug - - MSYSTEM: MINGW32 - CPU: i686 - CONFIG_FLAGS: --enable-debug - - MSYSTEM: MINGW64 - CPU: x86_64 - MSVC: amd64 - - MSYSTEM: MINGW64 - CPU: x86_64 - - MSYSTEM: MINGW32 - CPU: i686 - MSVC: x86 - - MSYSTEM: MINGW32 - CPU: i686 - -install: - - set PATH=c:\msys64\%MSYSTEM%\bin;c:\msys64\usr\bin;%PATH% - - if defined MSVC call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %MSVC% - - if defined MSVC pacman --noconfirm -Rsc mingw-w64-%CPU%-gcc gcc - -build_script: - - bash -c "autoconf" - - bash -c "./configure $CONFIG_FLAGS" - - mingw32-make - - file lib/jemalloc.dll - - mingw32-make tests - - mingw32-make -k check diff --git a/.gitattributes b/.gitattributes index 6313b56c57..bab55ef5d9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=auto eol=lf +* -text \ No newline at end of file diff --git a/.github/workflows/check_formatting.yaml b/.github/workflows/check_formatting.yaml deleted file mode 100644 index 8a10065f9f..0000000000 --- a/.github/workflows/check_formatting.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: 'Check Formatting' -on: [pull_request] -jobs: - check-formatting: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Check for trailing whitespace - run: scripts/check_trailing_whitespace.sh diff --git a/.github/workflows/lwjgl.yml b/.github/workflows/lwjgl.yml new file mode 100644 index 0000000000..3943c271ac --- /dev/null +++ b/.github/workflows/lwjgl.yml @@ -0,0 +1,274 @@ +name: LWJGL Build + +on: + workflow_dispatch: + push: + branches: + - master + +env: + AWS_DEFAULT_REGION: us-east-1 + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0" + JEMALLOC_PARAMS: --with-jemalloc-prefix=je_ --disable-stats --disable-fill --disable-cxx --enable-doc=no + +jobs: + linux: + name: Linux + runs-on: ubuntu-latest + container: + image: centos:7 + strategy: + fail-fast: false + matrix: + ARCH: [x64] + include: + - ARCH: x64 + HOST: x86_64-pc-linux-gnu + defaults: + run: + shell: bash + steps: + - name: Upgrade git + run: | + yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm + yum -y install git + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + fetch-tags: true + - name: Configure yum + run: | + yum -y install epel-release + yum -y update + - name: Install build dependencies + run: | + yum -y install centos-release-scl + yum -y install devtoolset-11-gcc-c++ + yum -y install autoconf automake libtool awscli + - name: Configure build + run: | + source scl_source enable devtoolset-11 || true + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" ./autogen.sh $JEMALLOC_PARAMS --disable-initial-exec-tls --host=${{matrix.HOST}} || true + cat config.log + - name: Build + run: | + source scl_source enable devtoolset-11 || true + make + strip lib/libjemalloc.so + - name: Upload artifact + run: aws s3 cp lib/libjemalloc.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + - name: Upload git revision + run: | + git config --global --add safe.directory $PWD + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.so.git + aws s3 cp libjemalloc.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + + linux-cross: + name: Linux Cross + runs-on: ubuntu-latest + container: + image: ${{matrix.CONTAINER}} + strategy: + fail-fast: false + matrix: + ARCH: [arm32, arm64, ppc64le, riscv64] + include: + # ----- + - ARCH: arm32 + CROSS_ARCH: armhf + CONTAINER: ubuntu:18.04 + TRIPLET: arm-linux-gnueabihf + EXTRA_PARAMS: + HOST: arm-unknown-linux-gnueabihf + # ----- + - ARCH: arm64 + CROSS_ARCH: arm64 + CONTAINER: ubuntu:18.04 + TRIPLET: aarch64-linux-gnu + EXTRA_PARAMS: --with-lg-page=14 + HOST: aarch64-unknown-linux-gnu + # ---- + - ARCH: ppc64le + CROSS_ARCH: ppc64el + CONTAINER: ubuntu:18.04 + TRIPLET: powerpc64le-linux-gnu + EXTRA_PARAMS: + HOST: powerpc64le-unknown-linux-gnu + # ----- + - ARCH: riscv64 + CROSS_ARCH: riscv64 + CONTAINER: ubuntu:20.04 + TRIPLET: riscv64-linux-gnu + EXTRA_PARAMS: + HOST: riscv64-unknown-linux-gnu + env: + LWJGL_ARCH: ${{matrix.ARCH}} + defaults: + run: + shell: bash + steps: + - name: Update apt repositories + run: | + apt-get -y update + apt-get -y install software-properties-common + apt-get -y install --reinstall ca-certificates + add-apt-repository -y ppa:git-core/ppa + if: ${{ matrix.CONTAINER == 'ubuntu:18.04' }} + - name: Upgrade git + run: | + apt-get -y update + apt-get -y upgrade + DEBIAN_FRONTEND=noninteractive apt-get -yq install awscli git autoconf make + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + fetch-tags: true + - name: Prepare cross-compilation for ${{matrix.CROSS_ARCH}} + run: apt-get update + - name: Install dependencies + run: apt-get -yq install gcc-${{matrix.TRIPLET}} libc6-dev-${{matrix.CROSS_ARCH}}-cross + - name: Configure build + run: | + PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/lib/${{matrix.TRIPLET}}/pkgconfig CC=${{matrix.TRIPLET}}-gcc CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" ./autogen.sh $JEMALLOC_PARAMS ${{matrix.EXTRA_PARAMS}} --disable-initial-exec-tls --host=${{matrix.HOST}} || true + cat config.log + - name: Build + run: | + make + ${{matrix.TRIPLET}}-strip lib/libjemalloc.so + - name: Upload artifact + run: aws s3 cp lib/libjemalloc.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + - name: Upload git revision + run: | + git config --global --add safe.directory $PWD + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.so.git + aws s3 cp libjemalloc.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS + + freebsd-cross: + name: FreeBSD Cross + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + fetch-tags: true + - name: Build + uses: cross-platform-actions/action@v0.24.0 + with: + operating_system: freebsd + architecture: x86-64 + version: '13.2' + memory: 4G + shell: bash + environment_variables: JEMALLOC_PARAMS + run: | + sudo pkg install -y autoconf automake libtool gmake + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" ./autogen.sh $JEMALLOC_PARAMS --disable-initial-exec-tls --enable-lazy-lock=no + gmake + strip lib/libjemalloc.so + - name: Upload artifact + run: aws s3 cp lib/libjemalloc.so s3://lwjgl-build/nightly/freebsd/x64/ $S3_PARAMS + - name: Upload git revision + run: | + git config --global --add safe.directory $PWD + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.so.git + aws s3 cp libjemalloc.so.git s3://lwjgl-build/nightly/freebsd/x64/ $S3_PARAMS + + macos: + name: macOS + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + ARCH: [x64, arm64] + include: + - ARCH: x64 + DARWIN: 15 + CC: MACOSX_DEPLOYMENT_TARGET=10.11 EXTRA_CFLAGS="-target x64-apple-darwin -arch x86_64 -mmacosx-version-min=10.11" LDFLAGS="-target x64-apple-darwin -arch x86_64 -mmacosx-version-min=10.11" + HOST: x86_64 + EXTRA_PARAMS: + - ARCH: arm64 + DARWIN: 20 + CC: MACOSX_DEPLOYMENT_TARGET=11.0 EXTRA_CFLAGS="-target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0" LDFLAGS="-target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0" + HOST: aarch64 + EXTRA_PARAMS: --with-lg-page=14 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + fetch-tags: true + - name: Install dependencies + run: brew install automake + - name: Configure build + run: ${{matrix.CC}} ./autogen.sh $JEMALLOC_PARAMS --disable-initial-exec-tls --disable-zone-allocator --target ${{matrix.ARCH}}-apple-darwin${{matrix.DARWIN}} --host=${{matrix.HOST}}-apple-darwin${{matrix.DARWIN}} ${{matrix.EXTRA_PARAMS}} + - name: Build + run: | + ${{matrix.CC}} make + strip -u -r lib/libjemalloc.dylib + - name: Upload artifact + run: aws s3 cp lib/libjemalloc.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS + - name: Upload git revision + run: | + git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.dylib.git + aws s3 cp libjemalloc.dylib.git s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS + + windows: + name: Windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + ARCH: [x86, x64, arm64] + include: + - ARCH: x86 + MSVC_ARCH: amd64_x86 + HOST: i686-pc-cygwin + CFLAGS: + - ARCH: x64 + MSVC_ARCH: amd64 + HOST: x86_64-w64-cygwin + CFLAGS: + - ARCH: arm64 + MSVC_ARCH: amd64_arm64 + HOST: aarch64-w64-cygwin + CFLAGS: /D__aarch64__ + defaults: + run: + shell: cmd + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 3 + fetch-tags: true +# - id: cygwin-cache +# uses: actions/cache@v2 +# with: +# path: C:\cygwin +# key: cygwin-cache + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{matrix.MSVC_ARCH}} + - name: Install dependencies + run: | + choco install cygwin -x64 --params "/InstallDir:C:\cygwin" + choco install cyg-get + cyg-get autoconf make + #if: steps.cygwin-cache.outputs.cache-hit != 'true' + - name: Prepare Cygwin + run: C:\cygwin\bin\sh -lc "(cd $OLDPWD;)" + - name: Configure build + run: | + C:\cygwin\bin\sh -lc "(cd $OLDPWD; set -o igncr; autoconf;)" + C:\cygwin\bin\sh -lc "(cd $OLDPWD; set -o igncr; CFLAGS='/EHsc /GF /Gy /GL /GR- /GS- /MP /DNDEBUG ${{matrix.CFLAGS}}' CC=cl ac_cv_c_bigendian=no ./configure --host=${{matrix.HOST}} %JEMALLOC_PARAMS%;)" + - name: Build + run: | + C:\cygwin\bin\sh -lc "(cd $OLDPWD; set -o igncr; make;)" + - name: Upload artifact + run: aws s3 cp lib\jemalloc.dll s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ %S3_PARAMS% + - name: Upload git revision + run: | + git log --first-parent --pretty=format:%%H HEAD~2..HEAD~1 > jemalloc.dll.git + aws s3 cp jemalloc.dll.git s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ %S3_PARAMS% diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml deleted file mode 100644 index 29e617fca1..0000000000 --- a/.github/workflows/static_analysis.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: 'Static Analysis' -on: [pull_request] -jobs: - static-analysis: - runs-on: ubuntu-latest - steps: - # We build libunwind ourselves because sadly the version - # provided by Ubuntu via apt-get is much too old. - - name: Check out libunwind - uses: actions/checkout@v4 - with: - repository: libunwind/libunwind - path: libunwind - ref: 'v1.6.2' - github-server-url: 'https://github.com' - - name: Install libunwind - run: | - cd libunwind - autoreconf -i - ./configure --prefix=/usr - make -s -j $(nproc) V=0 - sudo make -s install V=0 - cd .. - rm -rf libunwind - - name: Check out repository - uses: actions/checkout@v4 - # We download LLVM directly from the latest stable release - # on GitHub, because this tends to be much newer than the - # version available via apt-get in Ubuntu. - - name: Download LLVM - uses: dsaltares/fetch-gh-release-asset@master - with: - repo: 'llvm/llvm-project' - version: 'tags/llvmorg-16.0.4' - file: 'clang[+]llvm-.*x86_64-linux-gnu.*' - regex: true - target: 'llvm_assets/' - token: ${{ secrets.GITHUB_TOKEN }} - - name: Install prerequisites - id: install_prerequisites - run: | - tar -C llvm_assets -xaf llvm_assets/*.tar* & - sudo apt-get update - sudo apt-get install -y jq bear python3-pip - pip install codechecker - echo "Extracting LLVM from tar" 1>&2 - wait - echo "LLVM_BIN_DIR=$(echo llvm_assets/clang*/bin)" >> "$GITHUB_OUTPUT" - - name: Run static analysis - id: run_static_analysis - run: > - PATH="${{ steps.install_prerequisites.outputs.LLVM_BIN_DIR }}:$PATH" - LDFLAGS='-L/usr/lib' - scripts/run_static_analysis.sh static_analysis_results "$GITHUB_OUTPUT" - - name: Upload static analysis results - if: ${{ steps.run_static_analysis.outputs.HAS_STATIC_ANALYSIS_RESULTS }} == '1' - uses: actions/upload-artifact@v4 - with: - name: static_analysis_results - path: static_analysis_results - - name: Check static analysis results - run: | - if [[ "${{ steps.run_static_analysis.outputs.HAS_STATIC_ANALYSIS_RESULTS }}" == '1' ]] - then - echo "::error::Static analysis found issues with your code. Download the 'static_analysis_results' artifact from this workflow and view the 'index.html' file contained within it in a web browser locally for detailed results." - exit 1 - fi - diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ec1481c458..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,368 +0,0 @@ -# This config file is generated by ./scripts/gen_travis.py. -# Do not edit by hand. - -# We use 'minimal', because 'generic' makes Windows VMs hang at startup. Also -# the software provided by 'generic' is simply not needed for our tests. -# Differences are explained here: -# https://docs.travis-ci.com/user/languages/minimal-and-generic/ -language: minimal -dist: jammy - -jobs: - include: - - os: windows - arch: amd64 - env: CC=gcc CXX=g++ EXTRA_CFLAGS="-fcommon" - - os: windows - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-fcommon" - - os: windows - arch: amd64 - env: CC=cl.exe CXX=cl.exe - - os: windows - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes EXTRA_CFLAGS="-fcommon" - - os: windows - arch: amd64 - env: CC=cl.exe CXX=cl.exe CONFIGURE_FLAGS="--enable-debug" - - os: windows - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-fcommon" - - os: windows - arch: amd64 - env: CC=cl.exe CXX=cl.exe CROSS_COMPILE_32BIT=yes - - os: windows - arch: amd64 - env: CC=cl.exe CXX=cl.exe CROSS_COMPILE_32BIT=yes CONFIGURE_FLAGS="--enable-debug" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=clang CXX=clang++ CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes COMPILER_FLAGS="-m32" CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl --enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl --with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks --with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16 --with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16 --with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16 --with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16 --with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false,background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=dss:primary,percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=dss:primary,background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu,background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=dss:primary" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: linux - arch: ppc64le - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=background_thread:true" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CROSS_COMPILE_32BIT=yes EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-stats" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--disable-libdl" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-opt-safety-checks" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-lg-page=16" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=tcache:false" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - - os: osx - arch: amd64 - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--with-malloc-conf=percpu_arena:percpu" EXTRA_CFLAGS="-Werror -Wno-array-bounds -Wno-unknown-warning-option -Wno-ignored-attributes -Wno-deprecated-declarations" - # Development build - - os: linux - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --disable-cache-oblivious --enable-stats --enable-log --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - # --enable-expermental-smallocx: - - os: linux - env: CC=gcc CXX=g++ CONFIGURE_FLAGS="--enable-debug --enable-experimental-smallocx --enable-stats --enable-prof" EXTRA_CFLAGS="-Werror -Wno-array-bounds" - - -before_install: - - |- - if test -f "./scripts/$TRAVIS_OS_NAME/before_install.sh"; then - source ./scripts/$TRAVIS_OS_NAME/before_install.sh - fi - -before_script: - - |- - if test -f "./scripts/$TRAVIS_OS_NAME/before_script.sh"; then - source ./scripts/$TRAVIS_OS_NAME/before_script.sh - else - scripts/gen_travis.py > travis_script && diff .travis.yml travis_script - autoconf - # If COMPILER_FLAGS are not empty, add them to CC and CXX - ./configure ${COMPILER_FLAGS:+ CC="$CC $COMPILER_FLAGS" CXX="$CXX $COMPILER_FLAGS"} $CONFIGURE_FLAGS - make -j3 - make -j3 tests - fi - -script: - - |- - if test -f "./scripts/$TRAVIS_OS_NAME/script.sh"; then - source ./scripts/$TRAVIS_OS_NAME/script.sh - else - make check - fi - diff --git a/configure.ac b/configure.ac index ff493e1dd2..c9e50e5469 100644 --- a/configure.ac +++ b/configure.ac @@ -263,13 +263,13 @@ if test "x$GCC" = "xyes" ; then JE_CFLAGS_ADD([-Wno-missing-field-initializers]) JE_CFLAGS_ADD([-Wno-missing-attributes]) JE_CFLAGS_ADD([-pipe]) - JE_CFLAGS_ADD([-g3]) + dnl JE_CFLAGS_ADD([-g3]) elif test "x$je_cv_msvc" = "xyes" ; then CC="$CC -nologo" - JE_CFLAGS_ADD([-Zi]) + dnl JE_CFLAGS_ADD([-Zi]) JE_CFLAGS_ADD([-MT]) JE_CFLAGS_ADD([-W3]) - JE_CFLAGS_ADD([-FS]) + dnl JE_CFLAGS_ADD([-FS]) JE_APPEND_VS(CPPFLAGS, -I${srcdir}/include/msvc_compat) fi if test "x$je_cv_cray" = "xyes" ; then @@ -799,7 +799,8 @@ case "${host}" in if test "x$je_cv_msvc" = "xyes" ; then importlib="lib" DSO_LDFLAGS="-LD" - EXTRA_LDFLAGS="-link -DEBUG" + dnl EXTRA_LDFLAGS="-link -DEBUG" + EXTRA_LDFLAGS="/link /OPT:REF,ICF /DLL /LTCG" CTARGET='-Fo$@' LDTARGET='-Fe$@' AR='lib' @@ -897,6 +898,9 @@ if test "x${je_cv_attribute}" = "xyes" ; then JE_CXXFLAGS_ADD([-fvisibility=hidden]) fi fi +if test "x$GCC" = "xyes" ; then + JE_CXXFLAGS_ADD([-mtls-dialect=gnu2]) +fi dnl Check for tls_model attribute support (clang 3.0 still lacks support). JE_CFLAGS_SAVE() JE_CFLAGS_ADD([-Werror]) @@ -1320,8 +1324,8 @@ if test "x$enable_debug" = "x0" ; then JE_CXXFLAGS_ADD([-O3]) JE_CFLAGS_ADD([-funroll-loops]) elif test "x$je_cv_msvc" = "xyes" ; then - JE_CFLAGS_ADD([-O2]) - JE_CXXFLAGS_ADD([-O2]) + JE_CFLAGS_ADD([-Ox]) + JE_CXXFLAGS_ADD([-Ox]) else JE_CFLAGS_ADD([-O]) JE_CXXFLAGS_ADD([-O])