farzonl wrote:

> I'm still somewhat confused about why that one file in particular is 
> problematic, but I guess if this works it's fine.
> 
> Would making these OBJECT instead of STATIC libraries avoid the issue perhaps?

No OBJECT seems to cause many more linker errors. So i'm going to stick with 
the current solution and merge in the morning if there are no other concerns.

```bash
ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(unsigned int, 
clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, llvm::Triple::ArchType)
>>> referenced by CGBuiltin.cpp:65 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:65)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(unsigned int, 
clang::CallExpr const*, llvm::Triple::ArchType)
>>> referenced by CGBuiltin.cpp:69 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:69)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitBPFBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:72 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:72)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:75 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:75)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:80 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:80)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:83 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:83)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a
>>> referenced by CGBuiltin.cpp:102 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:102)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:85 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:85)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:88 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:88)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:91 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:91)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitHexagonBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:93 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:93)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitRISCVBuiltinExpr(unsigned int, 
clang::CallExpr const*, clang::CodeGen::ReturnValueSlot)
>>> referenced by CGBuiltin.cpp:96 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:96)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitSPIRVBuiltinExpr(unsigned int, 
clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:98 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:98)
>>>               
>>> CGBuiltin.cpp.o:(EmitTargetArchBuiltinExpr(clang::CodeGen::CodeGenFunction*,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot, 
>>> llvm::Triple::ArchType)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitScalarOrConstFoldImmArg(unsigned int, 
unsigned int, clang::CallExpr const*)
>>> referenced by CGBuiltin.cpp:6050 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGBuiltin.cpp:6050)
>>>               
>>> CGBuiltin.cpp.o:(clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(clang::GlobalDecl,
>>>  unsigned int, clang::CallExpr const*, clang::CodeGen::ReturnValueSlot)) in 
>>> archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenModule::handleCUDALaunchBoundsAttr(llvm::Function*, 
clang::CUDALaunchBoundsAttr const*, int*, int*, int*)
>>> referenced by CGOpenMPRuntime.cpp:5885 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5885)
>>>               
>>> CGOpenMPRuntime.cpp.o:(clang::CodeGen::CGOpenMPRuntime::computeMinAndMaxThreadsAndTeams(clang::OMPExecutableDirective
>>>  const&, clang::CodeGen::CodeGenFunction&, 
>>> llvm::OpenMPIRBuilder::TargetKernelDefaultAttrs&)) in archive 
>>> lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenModule::handleAMDGPUFlatWorkGroupSizeAttr(llvm::Function*,
 clang::AMDGPUFlatWorkGroupSizeAttr const*, clang::ReqdWorkGroupSizeAttr 
const*, int*, int*)
>>> referenced by CGOpenMPRuntime.cpp:5888 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5888)
>>>               
>>> CGOpenMPRuntime.cpp.o:(clang::CodeGen::CGOpenMPRuntime::computeMinAndMaxThreadsAndTeams(clang::OMPExecutableDirective
>>>  const&, clang::CodeGen::CodeGenFunction&, 
>>> llvm::OpenMPIRBuilder::TargetKernelDefaultAttrs&)) in archive 
>>> lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenModule::handleAMDGPUWavesPerEUAttr(llvm::Function*, 
clang::AMDGPUWavesPerEUAttr const*)
>>> referenced by CGOpenMPRuntime.cpp:5937 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp:5937)
>>>               
>>> CGOpenMPRuntime.cpp.o:(clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(clang::OMPExecutableDirective
>>>  const&, llvm::StringRef, llvm::Function*&, llvm::Constant*&, bool, 
>>> clang::CodeGen::RegionCodeGenTy const&)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::computeSPIRKernelABIInfo(clang::CodeGen::CodeGenModule&, 
clang::CodeGen::CGFunctionInfo&)
>>> referenced by CGCall.cpp:844 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CGCall.cpp:844)
>>>               
>>> CGCall.cpp.o:(clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(clang::CanQual<clang::Type>,
>>>  clang::CodeGen::FnInfoOpts, llvm::ArrayRef<clang::CanQual<clang::Type>>, 
>>> clang::FunctionType::ExtInfo, 
>>> llvm::ArrayRef<clang::FunctionType::ExtParameterInfo>, 
>>> clang::CodeGen::RequiredArgs)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitAArch64CpuSupports(llvm::ArrayRef<llvm::StringRef>)
>>> referenced by CodeGenFunction.cpp:2881 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:2881)
>>>               
>>> CodeGenFunction.cpp.o:(clang::CodeGen::CodeGenFunction::FormAArch64ResolverCondition(clang::CodeGen::CodeGenFunction::FMVResolverOption
>>>  const&)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitX86CpuSupports(llvm::ArrayRef<llvm::StringRef>)
>>> referenced by CodeGenFunction.cpp:2893 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:2893)
>>>               
>>> CodeGenFunction.cpp.o:(clang::CodeGen::CodeGenFunction::FormX86ResolverCondition(clang::CodeGen::CodeGenFunction::FMVResolverOption
>>>  const&)) in archive lib/libclangCodeGen.a
>>> referenced by CodeGenFunction.cpp:2899 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:2899)
>>>               
>>> CodeGenFunction.cpp.o:(clang::CodeGen::CodeGenFunction::FormX86ResolverCondition(clang::CodeGen::CodeGenFunction::FMVResolverOption
>>>  const&)) in archive lib/libclangCodeGen.a

ld.lld: error: undefined symbol: 
clang::CodeGen::CodeGenFunction::EmitX86CpuIs(llvm::StringRef)
>>> referenced by CodeGenFunction.cpp:2895 
>>> (/mnt/DevDrive/projects/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:2895)
>>>               
>>> CodeGenFunction.cpp.o:(clang::CodeGen::CodeGenFunction::FormX86ResolverCondition(clang::CodeGen::CodeGenFunction::FMVResolverOption
>>>  const&)) in archive lib/libclangCodeGen.a

ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to 
see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see 
invocation)
```

https://github.com/llvm/llvm-project/pull/133850
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to