-
Notifications
You must be signed in to change notification settings - Fork 896
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
Add YosysHQ/abc as a submodule located in abc. #4243
Conversation
@RCoeurjoly please note that WASI is intentionally built in build directory since that exercise out of tree build that is used in YoWASP distribution. That is then very useful since it points out if changes done in Makefiles affect out of tree builds. |
Oh I see. |
Also abc.tar.gz that is used is one from https://github.com/YosysHQ/yosys/releases This is more for situations where people are downloading specific Yosys version and corresponding abc.tar.gz file and building them on isolated environments. |
Makefile
Outdated
.PHONY: abc/abc-$(ABCREV)$(EXE) | ||
.PHONY: abc/libabc-$(ABCREV).a | ||
.PHONY: abc/abc$(EXE) | ||
.PHONY: abc/libabc.a |
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.
$(ABCREV)
was used to make sure abc actually gets rebuilt when you change the ABC checkout. Is this still the case? If not you'll need some other way to rebuild ABC when that happens.
fa2797a
to
4d3250e
Compare
Makefile
Outdated
@@ -776,15 +776,15 @@ $(PROGRAM_PREFIX)yosys-config: misc/yosys-config.in | |||
|
|||
ABC_SOURCES := $(wildcard $(YOSYS_SRC)/abc/*) | |||
|
|||
abc/abc$(EXE) abc/libabc.a: $(ABC_SOURCES) | |||
$(YOSYS_SRC)/abc/abc$(EXE) $(YOSYS_SRC)/abc/libabc.a: $(ABC_SOURCES) |
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.
An out-of-tree build of Yosys should also do an out-of-tree build of abc.
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.
Should the abc executable be located in build in that case?
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.
Yep, along with all other files generated during the build. Running git clean -dxf
in the Yosys or abc checkout should do nothing. (Modulo the odd case of abc being not actually a checked-out submodule, where generated files should live in the same place but my illustration does not work.)
945af49
to
b112939
Compare
07d478c
to
4368804
Compare
4920c5c
to
93a5ec9
Compare
.gitignore
Outdated
@@ -46,3 +45,4 @@ __pycache__ | |||
/tests/unit/bintest/ | |||
/tests/unit/objtest/ | |||
/tests/ystests | |||
build |
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.
Should this not be /build
? This would ignore every file or directory called build
in the entire tree, which might unpleasantly surprise someone.
Makefile
Outdated
ABC_SOURCES := $(wildcard $(YOSYS_SRC)/abc/*) | ||
|
||
|
||
# This is a relative path, that is, we would like to build abc in $ROOT/abc/abc if compiling from root or $ROOT/build/abc/abc if compiling from $ROOT/build |
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.
This seems a bit of a confusing comment, as it appears to imply there's no support for out-of-tree builds.
0f40c1f
to
2e7231d
Compare
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.
Finally!!! Great job!
Thanks! It was a team effort. You may want to review that also. |
a6a6fda
to
98d7475
Compare
98d7475
to
49a6d21
Compare
d548186
to
6d181c2
Compare
This broke the YoWASP build after all: https://github.com/YoWASP/yosys/actions/runs/9010585766/job/24756882140#step:7:657
|
So it turns out the YoWASP build was broken because I didn't check out submodules recursively, and the really confusing error message comes from the combination of an improper check for the presence of the submodule combined with the use of |
Add YosysHQ/abc as a submodule located in abc. Apart from cloning with submodules, no other modifications are made to github actions.
This would enable building yosys with abc fetched as tar.gz, as pointed out by @mmicko in #4238 (comment)
Before starting the compilation of abc, we check four cases:
git submodule status
). The compilation can continue.