# Common options for Ubuntu, no matter the version.

build --force_pic
build --fission=dbg
build --features=per_object_debug_info

# Configure ${PATH} for actions.
# N.B. Ensure this is consistent with `execute.bzl`.
build --action_env=PATH=/usr/bin:/bin

# Disable python imports from ~/.local (pip -U) during build and test.
# https://github.com/bazelbuild/bazel/issues/4939
# https://github.com/RobotLocomotion/drake/issues/8475
build --action_env=PYTHONNOUSERSITE=1
build --test_env=PYTHONNOUSERSITE=1

# Enable OpenMP (when requested via --config=omp or --config=everything).
build:omp --copt=-DEIGEN_DONT_PARALLELIZE
build:omp --copt=-fopenmp
build:omp --linkopt=-fopenmp
build:packaging --config=omp
build:everything --config=omp

# Options for explicitly using GCC.
common:gcc --repo_env=CC=gcc
common:gcc --repo_env=CXX=g++
build:gcc --action_env=CC=gcc
build:gcc --action_env=CXX=g++
build:gcc --host_action_env=CC=gcc
build:gcc --host_action_env=CXX=g++
