Skip to content
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

[Yosys] init #3435

Merged
merged 3 commits into from
Aug 6, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions Y/Yosys/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "Yosys"
version = v"0.1.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/YosysHQ/yosys.git", "2e421feb0ea526468493ab008f3c72beb12c2bc6")
]

dependencies = [
Dependency("boost_jll"; compat="=1.76.0"), # max gcc7
Dependency("Readline_jll"),
Dependency("Tcl_jll"),
Dependency("Zlib_jll"; compat="~1.2.11"),
Dependency("Libffi_jll"; compat="~3.2.2"),
]
sjkelly marked this conversation as resolved.
Show resolved Hide resolved

# Bash recipe for building across all platforms
script = raw"""
cd yosys
if [[ "${target}" == *-apple-* ]] || [[ "${target}" == *-freebsd* ]]; then
CONFIG=clang
else
CONFIG=gcc
fi
make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc}
make CONFIG=${CONFIG} PREFIX=${prefix} LINK_ABC=1 -j${nproc}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to try

Suggested change
make CONFIG=${CONFIG} PREFIX=${prefix} -j${nproc}
make CONFIG=${CONFIG} PREFIX=${prefix} ENABLE_ABC=0 -j${nproc}

to completely disable ABC, and see what happens, if you're OK

make install PREFIX=${prefix}
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = filter!(p -> Sys.isapple(p) || Sys.islinux(p), supported_platforms())

giordano marked this conversation as resolved.
Show resolved Hide resolved
giordano marked this conversation as resolved.
Show resolved Hide resolved
# The products that we will ensure are always built
products = Product[
ExecutableProduct("yosys", :yosys)
ExecutableProduct("yosys-config", :yosys_config)
ExecutableProduct("yosys-filterlib", :yosys_filterlib)
ExecutableProduct("yosys-smtbmc", :yosys_smtbmc)
ExecutableProduct("yosys-abc", :yosys_abc)
]

# Build the tarballs, and possibly a `build.jl` as well.
# gcc7 constraint from boost
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"7")