You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The environment variable `CXX` can be used to control the C++ compiler used, or
90
-
run one of the following:
86
+
run one of the following to override it:
91
87
92
88
$ make config-clang
93
89
$ make config-gcc
94
90
95
-
Note that these will result in `make` ignoring the `CXX` environment variable,
96
-
unless `CXX` is assigned in the call to make, e.g.
97
-
98
-
$ make CXX=$CXX
99
-
100
91
The Makefile has many variables influencing the build process. These can be
101
-
adjusted by modifying the Makefile.conf file which is created at the
102
-
`make config-...` step (see above), or they can be set by passing an option
103
-
to the make command directly.
104
-
105
-
For example, if you have clang, and (a compatible version of) `ld.lld`
106
-
available in PATH, it's recommended to speed up incremental builds with
107
-
lld by enabling LTO:
108
-
109
-
$ make ENABLE_LTO=1
110
-
111
-
On macOS, LTO requires using clang from homebrew which isn't in PATH
112
-
rather than xcode clang.
92
+
adjusted by modifying the Makefile.conf file which is created at the `make
93
+
config-...` step (see above), or they can be set by passing an option to the
94
+
make command directly:
113
95
114
-
$ make ENABLE_LTO=1 CXX=$(brew --prefix)/opt/llvm/bin/clang++
96
+
$ make CXX=$CXX
115
97
116
-
For other compilers and build configurations it might be
117
-
necessary to make some changes to the config section of the
118
-
Makefile. It's also an alternative way to set the make variables
119
-
mentioned above.
98
+
For other compilers and build configurations it might be necessary to make some
99
+
changes to the config section of the Makefile. It's also an alternative way to
100
+
set the make variables mentioned above.
120
101
121
102
$ vi Makefile # ..or..
122
103
$ vi Makefile.conf
@@ -126,10 +107,9 @@ To build Yosys simply type 'make' in this directory.
126
107
$ make
127
108
$ sudo make install
128
109
129
-
Note that this also downloads, builds and installs ABC (using yosys-abc
130
-
as executable name).
131
-
132
-
Tests are located in the tests subdirectory and can be executed using the test target. Note that you need gawk as well as a recent version of iverilog (i.e. build from git). Then, execute tests via:
110
+
Tests are located in the tests subdirectory and can be executed using the test
111
+
target. Note that you need gawk as well as a recent version of iverilog (i.e.
112
+
build from git). Then, execute tests via:
133
113
134
114
$ make test
135
115
@@ -140,6 +120,7 @@ To use a separate (out-of-tree) build directory, provide a path to the Makefile.
140
120
141
121
Out-of-tree builds require a clean source tree.
142
122
123
+
143
124
Getting Started
144
125
===============
145
126
@@ -289,68 +270,3 @@ From the root of the repository, run `make docs`. This will build/rebuild yosys
289
270
as necessary before generating the website documentation from the yosys help
290
271
commands. To build for pdf instead of html, call
291
272
`make docs DOC_TARGET=latexpdf`.
292
-
293
-
Building for Windows
294
-
====================
295
-
296
-
Creating the Visual Studio Template Project
297
-
-------------------------------------------
298
-
299
-
1. Create an empty Visual C++ Win32 Console App project
300
-
301
-
Microsoft Visual Studio Express 2013 for Windows Desktop
302
-
Open New Project Wizard (File -> New Project..)
303
-
304
-
Project Name: YosysVS
305
-
Solution Name: YosysVS
306
-
[X] Create directory for solution
307
-
[ ] Add to source control
308
-
309
-
[X] Console applications
310
-
[X] Empty Project
311
-
[ ] SDL checks
312
-
313
-
2. Open YosysVS Project Properties
314
-
315
-
Select Configuration: All Configurations
316
-
317
-
C/C++ -> General -> Additional Include Directories
318
-
Add: ..\yosys
319
-
320
-
C/C++ -> Preprocessor -> Preprocessor Definitions
321
-
Add: _YOSYS_;_CRT_SECURE_NO_WARNINGS
322
-
323
-
3. Resulting file system tree:
324
-
325
-
YosysVS/
326
-
YosysVS/YosysVS
327
-
YosysVS/YosysVS/YosysVS.vcxproj
328
-
YosysVS/YosysVS/YosysVS.vcxproj.filters
329
-
YosysVS/YosysVS.sdf
330
-
YosysVS/YosysVS.sln
331
-
YosysVS/YosysVS.v12.suo
332
-
333
-
4. Zip YosysVS as YosysVS-Tpl-v1.zip
334
-
335
-
Compiling with Visual Studio
336
-
----------------------------
337
-
338
-
Visual Studio builds are not directly supported by build scripts, but they are still possible.
339
-
340
-
1. Easy way
341
-
342
-
- Go to https://github.com/YosysHQ/yosys/actions/workflows/vs.yml?query=branch%3Amain
343
-
- Click on the most recent completed run
344
-
- In Artifacts region find vcxsrc and click on it to download
345
-
- Unpack downloaded ZIP file
346
-
- Open YosysVS.sln with Visual Studio
347
-
348
-
2. Using WSL or MSYS2
349
-
350
-
- Make sure to have make, python3 and git available
351
-
- Git clone yosys repository
352
-
- Execute ```make vcxsrc YOSYS_VER=latest```
353
-
- File yosys-win32-vcxsrc-latest.zip will be created
354
-
- Transfer that file to location visible by Windows application
0 commit comments