Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodesk: Bugfix: Enable customizing the suffix of constructor and destructor section name #2908

Commits on Jan 17, 2024

  1. BUGFIX: Enable to customize the suffix of constructor and destructor …

    …section name
    
    Background:
    
    USD put some functions in section named 'pxrctor', and those functions
    intend to be called to perform initialization work after loading the
    module.  Also, they are expected to be called only once.
    
    Now we have library A was linked to USD build A, and executable B has
    its own USD build B with modified dylib name. USD build A and B are
    different.  USD build A would be loaded first, then get a function lists
    via iterating all sections named 'pxrctor' from all loaded modules, and
    then call each of them. In one word, intialized. After that, while
    loading USD build B, the initialization process would also get a
    function lists in the same way, and it would also contains the functions
    lists collected from USD build A. Again, all functions would be called,
    including those from USD build A. That means those functions from USD
    build A would be called twice. And it leads to crash in our case.
    
    Solution:
    
    Enable to customize and append a suffix to the section name.  the
    corresponding build argument is
    `--build-args=USD,"-DPXR_INIT_SECTION_NAME_SUFFIX=_v2"`
    wingfiring committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    340588b View commit details
    Browse the repository at this point in the history