| Issue |
87167
|
| Summary |
Fatal Error LNK1227
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
RuiCuco
|
There's no Objective-C runtime in the clang project. There are a few C and C++ ones, but no Objective-C one. So, I tried using the GNU runtime (libobjc2, downloaded from github), and it compiled, but with a lot of warnings. However, I'm not sure it should issue all those warnings, because when I try to compile a simple project, after typing make, I get the following output:
```D:/Developer/LLVM/bin/clang.exe -I.. -std=c17 -fblocks -fobjc-exceptions -Wno-objc-root-class -c kObject.m
D:/Developer/LLVM/bin/clang.exe -I.. -std=c17 -fblocks -fobjc-exceptions -c kException.m
D:/Developer/LLVM/bin/clang.exe -I.. -std=c17 -fblocks -fobjc-exceptions -c kString.m
D:/Developer/LLVM/bin/clang.exe -I.. -std=c17 -fblocks -fobjc-exceptions -c kBool.m
D:/Developer/LLVM/bin/clang.exe -I.. -std=c17 -fblocks -fobjc-exceptions -o test.exe test.m kObject.o kException.o kString.o kBool.o -lobjc
kObject.o : fatal error LNK1227: conflicting weak extern definition for '__objc_class_ref_kString'. New default
'.weak.__objc_class_ref_kString.default.__objc_class_name_kObject' conflicts with old default '.weak.__objc_class_ref_kString.default.main' in test-203513.o
clang: error: linker command failed with exit code 1227 (use -v to see invocation)
make: *** [test.exe] Error 1227
```
Did I do something wrong, or is this a bug?
[kCore.zip](https://github.com/llvm/llvm-project/files/14812987/kCore.zip)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs