Skip to content

[Build] re2 not compiled when statically building with onnxruntime_BUILD_UNIT_TESTS=OFF #22513

Description

Describe the issue

I have compiled onnxruntime with the following command (on linux):

./build.sh --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync --update --build --build_dir build/linux

When linking this to a rust library (via ort), there seems to be an issue where, if the flag --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF is given, re2 isn't compiled (only when building a static library, apparently, it gets built when building the shared library).

Urgency

No response

Target platform

Linux x86_64

Build script

./build.sh --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync --update --build --build_dir build/linux

Error / output

There is no error at build time, linking downstream fails as described above.

Visual Studio Version

No response

GCC / Compiler Version

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using template

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions