Skip to content

add --remove-flags argument#288

Merged
rizsotto merged 1 commit intorizsotto:masterfrom
wangnangg:master
Jul 2, 2020
Merged

add --remove-flags argument#288
rizsotto merged 1 commit intorizsotto:masterfrom
wangnangg:master

Conversation

@wangnangg
Copy link
Copy Markdown
Contributor

Hi,

When I use Bear to capture cross-platform builds, I encountered a flag (-mabi=...) that will cause clangd to fail. Therefore, I added a Bear argument to add custom filters for flags. Figured it could be useful for others as well. so here it is.

@rizsotto
Copy link
Copy Markdown
Owner

rizsotto commented Jun 5, 2020

Thanks for this @wangnangg . Looks like a useful thing to do... Although I would do it as a post processing step, but I can understand that it's easier to do in a single step.

The build fails with this message:

Traceback (most recent call last):
   File "/home/travis/build/bear/bear", line 915, in <module>
     sys.exit(intercept_build())
   File "/home/travis/build/bear/bear", line 289, in wrapper
     return function(*args, **kwargs)
   File "/home/travis/build/bear/bear", line 322, in intercept_build
     entries = iter(set(itertools.chain(previous, current)))
   File "/home/travis/build/bear/bear", line 836, in load
     for compilation in Compilation.from_db_entry(entry, tools):
   File "/home/travis/build/bear/bear", line 695, in from_db_entry
     return cls.iter_from_execution(execution, tools)
TypeError: iter_from_execution() missing 1 required positional argument: 'flags_filter'

@wangnangg wangnangg force-pushed the master branch 2 times, most recently from d6f0584 to 0933e95 Compare June 6, 2020 02:36
@wangnangg
Copy link
Copy Markdown
Contributor Author

Hi, I fixed errors in Linux. For mac, it looks like it's not relevant to this change.

@rizsotto rizsotto merged commit 75ff7f5 into rizsotto:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants