Skip to content

Add options to control install behaviour in ASAN builds#138

Draft
lawruble13 wants to merge 3 commits intoROCm:release-staging/rocm-rel-5.7from
lawruble13:asan-files
Draft

Add options to control install behaviour in ASAN builds#138
lawruble13 wants to merge 3 commits intoROCm:release-staging/rocm-rel-5.7from
lawruble13:asan-files

Conversation

@lawruble13
Copy link
Collaborator

No description provided.

@lawruble13 lawruble13 requested review from cgmb and pfultz2 as code owners July 13, 2023 20:08
@lawruble13 lawruble13 marked this pull request as draft July 13, 2023 20:21
@pfultz2
Copy link
Collaborator

pfultz2 commented Jul 13, 2023

So PRIVATE means its not a user facing file, and is only used internally by the library. As such, it should be installed when using asan and not asan builds. For PRIVATE installs it should go into lib/<project-name>/ or lib/asan/<project-name>. This way the relative path to the file should be the same regardless if its asan or non-asan.

@lawruble13
Copy link
Collaborator Author

So PRIVATE means its not a user facing file, and is only used internally by the library. As such, it should be installed when using asan and not asan builds.

Ah, I misunderstood what you had said in our last discussion. Should there then be a flag to force a target to be ignored in the ASAN build, in addition to this PRIVATE flag?

endif()

if (PARSE_PRIVATE)
set(BIN_INSTALL_DIR ${BIN_INSTALL_DIR}/${PROJECT_NAME})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be ${LIB_INSTALL_DIR}/${PROJECT_NAME}.


if (PARSE_PRIVATE)
set(BIN_INSTALL_DIR ${BIN_INSTALL_DIR}/${PROJECT_NAME})
set(LIB_INSTALL_DIR ${LIB_INSTALL_DIR}/${PROJECT_NAME})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be ${LIB_INSTALL_DIR}/${PROJECT_NAME}/lib. Also, we should probably do this for include as well.

@pfultz2
Copy link
Collaborator

pfultz2 commented Jul 14, 2023

Should there then be a flag to force a target to be ignored in the ASAN build, in addition to this PRIVATE flag?

No, we should just ignore everything thats not a shared object by default in ASAN builds. Then the PRIVATE flag can install the file into lib/${PROJECT_NAME} or lib/asan/${PROJECT_NAME} for runtime components when ASAN is enabled.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants