-
-
Notifications
You must be signed in to change notification settings - Fork 646
Description
What's your question?
When building a project with the architecture set to x86_64 and the compiler being either GCC or Clang (only tested with gmake, unsure about other backends), premake adds a -L/usr/lib64 near the start of the linker command line. This leads to the linker preferring system libraries over ones specified in linkoptions that appear later in the command line.
Some of my library paths are specified via. linkoptions as I am consuming pkg-config output.
Is there a way to disable this behaviour while still having the architecture set? It is undesirable for me as I want to ensure my project draws from local dependencies during linkage instead of whatever system ones the user may or may not have installed.
Anything else we should know?
A basic reproduction of this issue can be achieved by the following:
-- premake5.lua
workspace "Workspace"
configurations { "Debug", "Release" }
project "Test"
kind "ConsoleApp"
architecture "x86_64"
files { "test.c" }
linkoptions { "-Lwhatever" }$ premake5 gmake
$ make verbose=1
...
g++ -o "bin/Debug/Test" obj/Debug/test.o -L/usr/lib64 -m64 -s -Lwhatever