-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nix updates 2.3 #3258
Nix updates 2.3 #3258
Changes from 50 commits
ab6916d
6c2b940
598ee75
8eea270
21efdea
886d866
d0c4489
8af1682
e4326d5
a03366d
76143b4
5f069f0
5cbd7d7
848f539
1822cb3
983b137
dedf8aa
b639b22
f1a6258
7033752
d8c1359
f5da3ba
8d84f77
1f9e356
ba0cf23
592f0b5
1f3fc3d
56ae1a1
f71330b
51eb893
39efd9f
7e84eb3
5f1fce7
a8623a4
985250a
e0357ca
f2e6ca1
1dbf7ef
0072448
86446c1
f043767
03d058e
364e966
694b74e
6b256b2
179883d
ae580f0
51accb5
9b12727
9fd7779
c702a88
7c1045f
69a5a8b
d339e2a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ Crate | |
crate | ||
InOut | ||
copyable | ||
sord |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: "NixOS Builds" | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
dev: | ||
strategy: | ||
matrix: | ||
include: | ||
- name: nixos-20.09-gcc | ||
os: nixos-20.09 | ||
use_clang: false | ||
use_clazy: false | ||
ccache: ccache-gcc | ||
name: "nix-shell ${{ matrix.name }}" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ccache cache files | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.ccache | ||
key: ${{ matrix.os }}-${{ matrix.ccache }}-${{ github.head_ref }}-${{ github.run_number }} | ||
restore-keys: | | ||
${{ matrix.os }}-${{ matrix.ccache }}-${{ github.head_ref }} | ||
${{ matrix.os }}-${{ matrix.ccache }}- | ||
- name: cache nix store | ||
uses: actions/cache@v2 | ||
with: | ||
path: /nix/store | ||
key: ${{ matrix.os }}-nix-${{ github.head_ref }}-${{ github.run_number }} | ||
restore-keys: | | ||
${{ matrix.os }}-nix-${{ github.head_ref }} | ||
${{ matrix.os }}-nix- | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:${{ matrix.os }} | ||
- run: | | ||
nix-shell --arg enableKeyfinder true --arg useClang ${{ matrix.use_clang }} \ | ||
--arg useClazy ${{ matrix.use_clazy }} --arg defaultLv2Plugins true \ | ||
--command "configure && build && run-tests" | ||
pkg: | ||
strategy: | ||
matrix: | ||
include: | ||
- name: nixos-20.09 | ||
os: nixos-20.09 | ||
name: "nix-build" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: cache nix store | ||
uses: actions/cache@v1.1.0 | ||
with: | ||
path: /nix/store | ||
key: ${{ matrix.os }}-nix-${{ github.head_ref }}-${{ github.run_number }} | ||
restore-keys: | | ||
${{ matrix.os }}-nix-${{ github.head_ref }} | ||
${{ matrix.os }}-nix- | ||
- uses: actions/checkout@v2.3.4 | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:${{ matrix.os }} | ||
- run: | | ||
if [ -n "$CACHIX_SIGNING_KEY" ]; then | ||
nix-build shell.nix --arg releaseMode true --arg defaultLv2Plugins true | cachix push mixxx; | ||
else | ||
nix-build shell.nix --arg releaseMode true --arg defaultLv2Plugins true | ||
fi |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,6 +57,13 @@ endif() | |
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
# using regular Clang or AppleClang | ||
set(LLVM_CLANG true) | ||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0.0" AND | ||
CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
message(WARNING "Found LLVM < 10 which has known optimization bugs with \ | ||
certain glibc versions. In case your build fails with linking errors. \ | ||
Use try using gcc if possible. Pass -DFAST_MATH=off to allow compilation | ||
to a slow binary. See https://bugs.llvm.org/show_bug.cgi?id=45034") | ||
endif() | ||
else() | ||
set(LLVM_CLANG false) | ||
endif() | ||
|
@@ -95,9 +102,13 @@ endif() | |
# | ||
# Optimizations | ||
# | ||
|
||
set(OPTIMIZE "portable" CACHE STRING "Optimization and Tuning (set to off, portable, native, legacy)") | ||
string(TOLOWER "${OPTIMIZE}" OPTIMIZE) | ||
|
||
# certain combinations of llvm and glibc cause problems with fastmath at link time. Add option to disable | ||
# fast-math but still allow other optimizations | ||
option(FAST_MATH "Use -fast-math optimization. Only disable this when linking fails with LLVM/GCC." ON) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this option still required? It is an not recommended experimental thing anyway producing a not usable Mixxx. The user can just comment out the -ffast-math flag below if he really wants. If we like to keep it, we need here a warning in the property description, that setting this to off is not recommended. This is NOT the recommended solution for the linker issue. Please improve the comment accordingly. |
||
|
||
message(STATUS "Optimization level: ${OPTIMIZE}") | ||
|
||
# CMAKE_INTERPROCEDURAL_OPTIMIZATION can be defined to override the default behaviour. | ||
|
@@ -244,9 +255,14 @@ elseif(GNU_GCC OR LLVM_CLANG) | |
# faster, measured on a Atom CPU. | ||
add_compile_options( | ||
-O3 | ||
-ffast-math | ||
-funroll-loops | ||
) | ||
if(FAST_MATH) | ||
add_compile_options( | ||
-ffast-math | ||
) | ||
endif() | ||
|
||
# set -fomit-frame-pointer when we don't profile and are not using | ||
# Clang sanitizers. | ||
# Note: It is only included in -O on machines where it does not | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please name the glibc version. The issue starts with glibc-2.31
bminor/glibc@7bdb921
On Ubuntu we have not issue because Ubuntu Bionic uses glibc-2.27 and LVVM 9
Ubuntu Focal has 2.31 but also LVVM 10.