Skip to content

Commit

Permalink
Fix LLVM compilation on Linux platform
Browse files Browse the repository at this point in the history
  • Loading branch information
poppolopoppo committed Oct 17, 2024
1 parent a4a1459 commit 4c0c8e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/hal/linux/LLVM.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,21 +241,21 @@ func (llvm *LlvmCompiler) CreateAction(u *Unit, payload PayloadType, model *acti
return nil
}
}
func (llvm *LlvmCompiler) Decorate(compileEnv *CompileEnv, u *Unit) error {
func (llvm *LlvmCompiler) Decorate(bg BuildGraphReadPort, compileEnv *CompileEnv, u *Unit) error {
if u.CompilerVerbose.Get() {
u.CompilerOptions.AppendUniq("-v")
}
if u.LinkerVerbose.Get() {
u.LinkerOptions.AppendUniq("-v")
}

switch compileEnv.GetPlatform().Arch {
switch compileEnv.GetPlatform(bg).Arch {
case ARCH_X86:
u.AddCompilationFlag_NoAnalysis("-m32")
case ARCH_X64:
u.AddCompilationFlag_NoAnalysis("-m64")
default:
base.UnexpectedValue(compileEnv.GetPlatform().Arch)
base.UnexpectedValue(compileEnv.GetPlatform(bg).Arch)
}

// set compiler options from configuration
Expand Down Expand Up @@ -465,7 +465,7 @@ func (llvm *LlvmCompiler) Build(bc BuildContext) error {
}

llvm.Version = llvm.ProductInstall.ActualVer
llvm.CompilerRules.Features = base.MakeEnumSet(
llvm.CompilerRules.Features = base.NewEnumSet(
COMPILER_ALLOW_CACHING,
COMPILER_ALLOW_DISTRIBUTION,
COMPILER_ALLOW_SOURCEMAPPING)
Expand Down

0 comments on commit 4c0c8e9

Please sign in to comment.