EnglishFrenchSpanish

OnWorks favicon

bear - Online in the Cloud

Run bear in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command bear that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


bear - build ear

SYNOPSIS


bear [options] [build commands]

DESCRIPTION


Bear is a tool to generate compilation database for clang tooling.

The JSON compilation database (http://clang.llvm.org/docs/JSONCompilationDatabase.html) is
used in clang project to provide information how a single compilation unit was processed.
When that is available then it is easy to re-run the compilation with different programs.

Bear execs the original build command and intercept the exec calls. To achieve that Bear
uses the LD_PRELOAD or DYLD_INSERT_LIBRARIES mechanisms provided by the dynamic linker.
There is a library which defines the exec methods and used in every child processes of the
build command. The executable itself sets the environment up to child processes and
writes the output file.

OPTIONS


-o output, --cdb output
Specify output file. Default value provided.

-a, --append
Use previously generated output file and append the new entries to it. This way
you can run bear continuously during work, and it keeps the compilation database up
to date. File deletion and addition are both considered. But build process change
(modifying compiler flags) will cause duplicate entries.

-v, --verbose
Make bear more verbose.

-l library
Specify the preloaded library location. Default value provided. (This option
mainly for development purposes.)

-n Disable filter. The output is also a JSON formated file. But the result is not a
compilation database. It contains all available information of the exec calls.
(This option mainly for development purposes.)

OUTPUT


There are two version of output formats. One is defined by the clang tooling. This goes
like this:

[
{ "directory": "/home/user/llvm/build",
"command": "clang++ -Irelative -c -o file.o file.cc",
"file": "file.cc" },
...
]

To achieve this bear has to run some filtering and formating. Build tools exec many
commands during the build process. Bear has to find was that a compiler call, and what
was the source file? The other output format is generated by the -n flag. (This output is
not formalized, it's used to debug bear itself.)

EXIT STATUS


Bear exit status is the exit status of the build command. Except when bear crashes, then
it sets to non zero.

ENVIRONMENT


BEAR_OUTPUT
The place of the temporary files where client shall report exec calls. Value set by
bear, overrides previous value for child processes.

LD_PRELOAD
Used by the dynamic loader on Linux, FreeBSD and other UNIX OS. Value set by bear,
overrides previous value for child processes.

DYLD_INSERT_LIBRARIES
Used by the dynamic loader on OS X. Value set by bear, overrides previous value
for child processes.

DYLD_FORCE_FLAT_NAMESPACE
Used by the dynamic loader on OS X. Value set by bear, overrides previous value
for child processes.

Use bear online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Image Downloader
    Image Downloader
    Crawl and download images using
    Selenium Using python3 and PyQt5.
    Supported Search Engine: Google, Bing,
    Baidu. Keywords input from the keyboard
    or input from ...
    Download Image Downloader
  • 2
    Eclipse Tomcat Plugin
    Eclipse Tomcat Plugin
    The Eclipse Tomcat Plugin provides
    simple integration of a tomcat servlet
    container for the development of java
    web applications. You can join us for
    discussio...
    Download Eclipse Tomcat Plugin
  • 3
    WebTorrent Desktop
    WebTorrent Desktop
    WebTorrent Desktop is for streaming
    torrents on Mac, Windows or Linux. It
    connects to both BitTorrent and
    WebTorrent peers. Now there's no
    need to wait for...
    Download WebTorrent Desktop
  • 4
    GenX
    GenX
    GenX is a scientific program to refine
    x-ray refelcetivity, neutron
    reflectivity and surface x-ray
    diffraction data using the differential
    evolution algorithm....
    Download GenX
  • 5
    pspp4windows
    pspp4windows
    PSPP is a program for statistical
    analysis of sampled data. It is a free
    replacement for the proprietary program
    SPSS. PSPP has both text-based and
    graphical us...
    Download pspp4windows
  • 6
    Git Extensions
    Git Extensions
    Git Extensions is a standalone UI tool
    for managing Git repositories. It also
    integrates with Windows Explorer and
    Microsoft Visual Studio
    (2015/2017/2019). Th...
    Download Git Extensions
  • More »

Linux commands

Ad