Skip to content

[origami] Origami needs to be factored as a real library dep #1887

@stellaraccident

Description

@stellaraccident

This code in origami is quite wrong and indicative of a serious design flaw.

Since Origami contains real source files, not just headers, it must be built and distributed as a proper library. I see cases where different components which must co-exist in the same process are simply add_subdirectory'ing it, which is triggering this codepath to produce a static library (which then has ODR issues when loading between different components). One of these was just implicated in an actual dev outage as it was not caught prior to check in.

I would like to see a plan or execution in one week to layer this properly so that it is not fundamentally broken. And I would like to see evidence for these directories that we have reviewers who are trained on these kinds of issues and that they are being consulted.

if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
    project(Origami VERSION 1.0.0 LANGUAGES CXX)

    set(ORIGAMI_STANDALONE ON)
else()
    set(ORIGAMI_STANDALONE OFF)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

include(dependencies)

rocm_setup_version(VERSION ${PROJECT_VERSION})

option(ORIGAMI_BUILD_SHARED_LIBS "Build shared libraries." ${ORIGAMI_STANDALONE})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions