Closed GreenSleeper closed 1 year ago
My 2 cents: I've been routinely using bear with full Android build for 3 years.
As you know, m
mm
croot
etc are shell functions defined once you source buildenvsetup
, intended for the developer to type less on the shell. It never came to my mind to use such commands in my builds / CI. I use plain make
invocation, which is a file in the path (very different from GNU make of course) and bear works fine.
Of course, I understand that this is a severe case of "ask us what you need, I'll explain you how to do without it" pattern. ¯_(ツ)_/¯
I understand what you're saying, and I directly use make
too.
But sometimes we use build.sh
to build. And if I use something like bear make surfaceflinger
I get this error:
build/make/core/main.mk:2: Calling make directly is no longer supported.
build/make/core/main.mk:3: Either use 'envsetup.sh; m' or 'build/soong/soong_ui.bash --make-mode'
build/make/core/main.mk:4: *** done. Stop.
Maybe I'll have to modify many mk
files to make it work.
Strangely enough though, if I directly use make surfaceflinger
, it will build successfully.
@GreenAsFuck if you could provide some context on your environment, that could help to help you. The issue template has some questions, which are addressing the relevant aspects of the context.
https://github.com/rizsotto/Bear/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
Sorry to bother, but I found a way to make soong
generate json file now, don't need bear
anymore. I'm closing this.
FYI:
Environment:
build command m
mm
are just typical android build command.
Sorry to bother, but I found a way to make
soong
generate json file now, don't needbear
anymore. I'm closing this.
Personally, I'd be interested if you could document that (maybe privately / by mail?) Android build is... er... let's say "big and special" for our "also special" usecases.
I am also happy to host that recipe on Bear's wiki. (Similar to Sarcasm's notebook)
https://android.googlesource.com/platform/build/soong/+/refs/heads/master/docs/compdb.md https://www.naseer.dev/post/compile-commands/ I followed these links and adapt it to my working environment, don't know if it will work for everone, but it works for me now.
I want to use
bear
with self defined build command likem
mm
inandroid
, but it doesn't seem to work.