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

adding -p | --prefix to buildTPC_LLVM.sh ? #1

Open
torehl opened this issue Sep 13, 2021 · 2 comments
Open

adding -p | --prefix to buildTPC_LLVM.sh ? #1

torehl opened this issue Sep 13, 2021 · 2 comments

Comments

@torehl
Copy link

torehl commented Sep 13, 2021

Hi,
would it be possible to add --prefix to the build script?

Should set -DCMAKE_INSTALL_PREFIX option. Makes it easier for nonstandard installs, e.g. module environment.

e.g.

# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
  set(CMAKE_INSTALL_PREFIX "/cm/shared/apps/habana/tpc-llvm/1.0.0")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")

Rgds,
ToreL

@michaelz-eng
Copy link
Contributor

michaelz-eng commented Sep 19, 2021

Hi Torel,

Thank you for sharing with us your thoughts. The problem that I see with supporting the installation flag is that the user may override the original OS compiler. The names of both Habana's CXX and C compilers are clang-10 and clang++-10 as of the original system compiler. I can add an optional flag to the script to install the component according to the user request, like --install=path what do you think?

Thanks,
Michael Zuckerman

@torehl
Copy link
Author

torehl commented May 21, 2022

I prepend-path. It's kind of expected that it replaces clang-10, if installed. Normally the HPC systems OS is quite a bit older, and clang-10 is not in.
I have

prepend-path PATH /cm/shared/apps/habana/tpc-llvm/1.0.0/bin
setenv CC /cm/shared/apps/habana/tpc-llvm/1.0.0/bin/clang
setenv CXX /cm/shared/apps/habana/tpc-llvm/1.0.0/bin/clang++

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

No branches or pull requests

2 participants