-
Notifications
You must be signed in to change notification settings - Fork 94
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 libbpf as a submodule #163
Conversation
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.
Nice, thanks! This will hopefully make things way less annoying for people. LGTM, just left a couple comments before stamping.
README.md
Outdated
$ cd $SCX | ||
$ git submodule init | ||
$ make -C libbpf/src | ||
$ meson setup build --prefix ~ -D libbpf_a=$SCX/libbpf/src/libbpf.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.
Should we make this the default behavior, and instead allow people to override libbpf_a
to something else?
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.
That makes sense. Will update
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.
Not a blocker, but if we want to make this the default, it'd be nice if the build script would automatically run a git submodule update --init --recursive
, so that it'll automatically fetch/update the submodule if it's not present (i.e. we could check if the dir libbpf/src
esists).
This can prevent issues with people cloning the repo without git clone --recursive
for example.
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.
Agreed. Ideally the build script can minimize the pain of working with submodules by hiding the details when possible.
Could be this directly added into meson/scx add provide a option to use statically or dynamically linked one? |
3a92647
to
3850232
Compare
@ptr1337 Probably my ignorance of meson, but I don't quite understand your comment. Isn't the libbpf_a user option deciding if libbpf is statically linked or not? |
See Decave's comment |
I think what he's requesting is:
|
Cool. I think I did this in my latest changes - please correct me if I missed something. The last thing I'll do is have meson do the |
Actually, can we land this as is and I'll add the |
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.
LGTM, if you wouldn't mind please fixing the one typo, I can merge
README.md
Outdated
#### Dynamic linking against libbpf | ||
``` | ||
$ cd $SCX | ||
$ meson setup build --prefix ~-D libbpf_a=disabled |
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.
Missing a space between ~ and -D
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.
Whoops. Good catch.
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.
Fixed
This is to potentinally reduce issues with folks using different versions of libbpf at runtime.
3850232
to
626e666
Compare
Revert "Merge pull request #163 from jordalgo/libbpf-submodule"
This is to potentinally reduce issues with folks using different versions of libbpf at runtime.