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

clang compile c executable has no @rpath on macos #2262

Open
lailongwei opened this issue Sep 26, 2024 · 1 comment
Open

clang compile c executable has no @rpath on macos #2262

lailongwei opened this issue Sep 26, 2024 · 1 comment
Labels

Comments

@lailongwei
Copy link
Contributor

lailongwei commented Sep 26, 2024

bug

  • clang command generate executable, has no @rpath option add in linking phase, eg: -Wl,-rpath,@loader_path/.
  • system & architecture info:
    • system: mac Sequoia 15.0
    • arch: Apple M3(ARM64)

premake5 ver:

last commit info:

commit d842e671c7bc7e09f2eeaafd199fd01e48b87ee7 (HEAD -> master, origin/master, origin/HEAD)
Author: João Matos <joao@tritao.eu>
Date:   Mon Apr 29 17:08:41 2024 +0100

    Update Emscripten extension fork modules.md
    
    This just updates the URL to my fork, which is an up to date and mantained version.

premake5 generated compile command:

clang   -MD -MP -D_GLIBCXX_USE_CXX11_ABI=0 -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_3  -O2 -g -Wall -Werror -Wno-strict-aliasing  -o "obj/release64/lullbc_luaexec/lua.o" -MF "obj/release64/lullbc_luaexec/lua.d" -c "../../wrap/lullbc/lua/lua.c"

additional info

If compile c++ file, will auto add -Wl,-rpath,@loader_path/. compile option when dll or exec generate

@lailongwei lailongwei added the bug label Sep 26, 2024
@lailongwei lailongwei changed the title clang compile c executable has no rpath on macos clang compile c executable has no @rpath on macos Sep 26, 2024
@tritao
Copy link
Contributor

tritao commented Sep 26, 2024

You can try adding this to https://github.com/premake/premake-core/blob/master/premake5.lua#L197 :

    runpathdirs { "." }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants