Commit Graph

33 Commits

Author SHA1 Message Date
Daira Hopwood bd61fbf056 Ensure that `CONFIGURE_FLAGS=--enable-debug` correctly uses -O0 for dependencies and main build.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-01-25 14:32:18 +00:00
Carl Dong 2c1c82f59a depends: Propagate well-known vars into depends
For example, doing:

  make CC=clang CXX=clang++

Should now propagate these settings down to depends packages
2021-01-15 05:24:25 +00:00
Kris Nuttycombe bce1da684b Remove vestigial OSX_SDK_VERSION from darwin build.
Upstream still uses this variable for qt builds, but as we no longer
have the GUI wallet it's unnecessary for Zcash.
2020-12-16 22:59:35 +00:00
fanquake f201e1e02d build: set minimum supported macOS to 10.14 2020-12-16 22:59:35 +00:00
Daira Hopwood a0a87ab413 Set release CFLAGS/CXXFLAGS to use -O3.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-11-13 22:39:17 +00:00
str4d eaed8d5797
depends: Add untested note to FreeBSD host
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 20:19:00 +01:00
Jack Grigg fa54a1661a depends: Add multilib paths for Linux cross-compile 2020-10-13 14:12:41 +01:00
Jack Grigg 1b96347867 depends: Add libc++ as a dependency
For mingw32:

- We use the binaries provided by MSYS2, which do not go back as far as
  libc++ 8. We use libc++ 9 here, matching the LLVM version we will be
  switching to in a subsequent commit (to match the LLVM version used by
  Rust 1.44). We manually specify the path to the libc++ headers,
  because they don't match the headers used by Clang itself.

- We now require at least mingw-w64 6.0.0, which fixes two Clang
  compilation bugs:
  - 1bd66b53be
  - 82b169c573

Darwin is ignored, as the Xcode SDK includes libc++.

For all other targets, we use the static libraries included in Clang
releases. We reuse the files we downloaded in native_clang for native
compilation, instead of fetching the archive twice.
2020-10-13 14:12:41 +01:00
Jack Grigg ff4cb00cb2 depends: Vendor LLD and use it for linking
We don't specify it for macOS, as we already pin a specific SDK there.
2020-10-12 18:10:16 +01:00
Jack Grigg d306b72be4 depends: Use vendored Clang for native compilation
Clang is used for compiling C/C++ dependencies, as well as the Zcash
binaries themselves. GCC is still required for compiling native
toolchain dependencies (such as ccache).
2020-10-12 17:55:12 +01:00
Carl Dong 25cc992ea3 depends: Add justifications for macOS clang flags 2020-07-30 04:33:36 +01:00
Cory Fields b22d18063b depends: specify libc++ header location for darwin
For depends builds this was fixed by fbcfcf69, which deleted the conflicting
headers. When we no longer control the clang installation, we need to ensure
that the SDK's libc++ headers are used rather than the ones shipped with clang.
We can do that by turning off the default include path and hard-coding our own.
This hard-coded path is ok because we control (via SDK packaging) where these
headers end-up.

Side-note: Now that this path is hard-coded in depends, we can potentially
package the SDK differently, as the c++ folder can live wherever is most
convenient for us.
2020-07-30 04:33:36 +01:00
Carl Dong 6ae57751cc depends: Specify path to native binaries as clang argument
Zcash: Extracted from upstream commit:
    depends: Allow building with system clang
2020-07-30 04:33:36 +01:00
Carl Dong d6c3af5e84 depends: Decouple toolchain + binutils
For now they remain the same, but in the next commit, we will assign
them differently according to wether or not we're using system clang.
2020-07-30 04:33:36 +01:00
fanquake a21fa08e0b doc: explain why passing -mlinker-version is required 2020-07-30 04:33:36 +01:00
Cory Fields 6b785ae72d darwin: pass mlinker-version so that clang enables new features
Without this clang fails to add any newly-added linker features.

Removing this in ca5055a5aa07aba81a87cf12f6f0526a63c423b5 was likely a
regression.

See https://github.com/bitcoin/bitcoin/pull/19240#issuecomment-647764049
for more discussion.
2020-07-30 04:33:36 +01:00
Cory Fields cc934c2b1d macos: Bump to xcode 11.3.1 and 10.15 SDK
This gets us a newer SDK with c++17 support and retains 10.12
back-compat.

Co-authored-by: Carl Dong <contact@carldong.me>
2020-07-30 04:33:36 +01:00
Carl Dong d02d06b565 Adapt rest of tooling to new SDK naming scheme 2020-07-30 04:33:36 +01:00
fanquake d75478432f build: use macOS 10.14 SDK
Co-Authored-By: Carl Dong <accounts@carldong.me>
2020-07-30 04:33:36 +01:00
fanquake a346fc0086 depends: native_cctools 921, ld64 409.12, libtapi 1000.10.8
This also removes the obsolete mlinker-version option

Co-Authored-By: Cory Fields <cory-nospam-@coryfields.com>

Zcash: Excludes QT changes.
2020-07-30 04:33:36 +01:00
fanquake e04c184205 build: set minimum supported macOS to 10.12 2020-07-30 04:33:36 +01:00
fanquake 0d3e5fc43c depends: set OSX_MIN_VERSION to 10.10 2020-07-30 04:33:36 +01:00
Jack Grigg 5222c39cd0 depends: Add FreeBSD to hosts and builders 2019-05-22 10:46:21 +00:00
Jack Grigg 283ad96e85
Use -O1 for darwin and mingw32 release builds
In 46ad3c2758 we standardised our linux builds to
use -O1, but we didn't adjust the other targets.
2018-08-17 16:44:00 +01:00
fanquake e2e7ca3054
[depends] Set OSX_MIN_VERSION to 10.8 2017-11-29 17:24:59 +00:00
Cory Fields 68ce87eddc
depends: bump OSX toolchain
clang: 3.7.1
cctools: 877.8
ld64: 253.9
2017-11-29 17:24:59 +00:00
Cory Fields 038a858d2f
depends: use c++11 2017-11-29 17:24:59 +00:00
Taylor Hornby 46ad3c2758 Fix inconsistent optimization flags; single source of truth. 2016-08-17 11:38:28 -06:00
Cory Fields f0172bf91e osx: bump build sdk to 10.9 2015-01-20 01:49:20 -05:00
Cory Fields 4fe6c3c24f depends: major upgrade to darwin toolchain
tl;dr: Update to the newer stable toolchain and SDK for OSX without giving up
any backwards compatibility. We can move to clang 3.5 as a next step which
allows use to use libc++ and the 10.10 sdk, but we'll need to find a build that
works in gitian/travis first.

Switch to a new, better maintained fork of cctools:
https://github.com/tpoechtrager/cctools-port

I've forked this and will be working on it some as well:
https://github.com/theuni/cctools-port

This brings in:
cctools v862
ld64: v241.9

It also fixes 64bit builds, so there's no longer any need to use a 32bit clang.
Since clang is no longer tied to an old/crusty 32bit build, clang has been
upgraded to 3.3. Unfortunately, there's a bug in 3.4 that breaks builds. 3.5
works fine, but there are no binary builds compatible with precise, which is
currently used for gitian and travis. We could always build our own if
necessary.

After updating to stable clang/linker/cctools, it's possible to use a more
recent SDK. The current SDK (10.7) through the most recent 10.10 have all been
built/tested successfully, both with and without 10.6 compatibility. However,
10.10 requires clang 3.5.

SDKs >= 10.9 use libc++ rather than libstdc++. This is verified working as well.
2015-01-02 15:09:43 -05:00
Cory Fields f397304002 depends: add debug/release flags for linux/osx/win
Linux and mingw enable libstdc++ debugging for extra runtime checks. OSX
doesn't play nice, so don't enable it there.
2014-09-25 14:56:26 -04:00
Cory Fields 2027ad30e7 depends: add the debug/release concept to depends 2014-09-25 14:56:25 -04:00
Cory Fields 1dec09b341 depends: add shared dependency builder
See the README's in depends for documentation
2014-08-08 15:10:46 -04:00