-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
verilator: switch to cmake #5680
Open
star-hengxing
wants to merge
16
commits into
dev
Choose a base branch
from
verilator-cmake
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
33147c8
verilator: switch to cmake
star-hengxing f8a6252
flex: fix msys
star-hengxing 16f012a
bison: fix msys
star-hengxing a644cd4
verilator: fix flex
star-hengxing 61d7a84
verilator: use old version
star-hengxing c86ead8
flex: add configs for autotools
star-hengxing 65b9e34
flex: fix include
star-hengxing 931273b
patch mingw
star-hengxing ac03659
fix mingw lto
star-hengxing a3684fe
try to fix flex for mac
star-hengxing b6c792e
remove std=c++20 for linux
star-hengxing abed752
get verbose info
star-hengxing 03bf723
Revert "get verbose info"
star-hengxing fe82a05
improve cp exe
star-hengxing d708e80
fix debug build on linux
star-hengxing 999b2e4
fix verilator name
star-hengxing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,16 @@ package("flex") | |
add_urls("https://github.com/westes/flex/releases/download/v$(version)/flex-$(version).tar.gz") | ||
end | ||
|
||
if is_subhost("msys") then | ||
add_deps("pacman::flex") | ||
end | ||
on_fetch(function (package) | ||
-- If pacman::flex already installed | ||
if is_subhost("msys") and package:is_library() then | ||
local msys_dir = os.getenv("MINGW_PREFIX") | ||
local header = path.join(path.directory(msys_dir), "usr/include/FlexLexer.h") | ||
os.trycp(header, package:installdir("include")) | ||
end | ||
end) | ||
|
||
on_load("macosx", "linux", "bsd", "windows", function (package) | ||
on_load("macosx", "linux", "bsd", "windows", "@msys", function (package) | ||
if package:is_plat("windows") then | ||
package:add("deps", "winflexbison", {private = true}) | ||
elseif package:is_plat("linux") then | ||
|
@@ -35,6 +40,13 @@ package("flex") | |
end) | ||
|
||
on_install("@msys", function (package) | ||
os.vrun("pacman -Sy --noconfirm --needed --disable-download-timeout flex") | ||
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. 还有这 |
||
-- https://github.com/msys2/MSYS2-packages/issues/1911 | ||
if package:is_library() then | ||
local msys_dir = os.getenv("MINGW_PREFIX") | ||
local header = path.join(path.directory(msys_dir), "usr/include/FlexLexer.h") | ||
os.vcp(header, package:installdir("include")) | ||
end | ||
end) | ||
|
||
on_install("windows", function (package) | ||
|
@@ -43,7 +55,13 @@ package("flex") | |
end) | ||
|
||
on_install("macosx", "linux", "bsd", "android", "iphoneos", "cross", function (package) | ||
import("package.tools.autoconf").install(package) | ||
local configs = {} | ||
table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no")) | ||
table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes")) | ||
if package:is_debug() then | ||
table.insert(configs, "--enable-debug") | ||
end | ||
import("package.tools.autoconf").install(package, configs) | ||
end) | ||
|
||
on_test(function (package) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
包配置里,不要直接调用 pacman/apt 等系统安装,会有权限问题,走 xmake 内置安装,而且你这么装,会装到系统路径,不是 包安装目录,会 break 掉 xrepo env
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.
而 xmake 内部调用 pacman 会有对权限的很多处理,这里不能这么搞,如果源码安装不行,宁愿禁用这个平台
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.
这个是 msys2 包,用
add_deps
会加上 mingw 前缀导致安装失败