Closed tylanphear closed 1 year ago
This fix is also urgent to unblock the downstream build. Pinging @hewj03, @haonanya for review.
@tylanphear I just take a look at link.txt and it show opencl-clang is linking libclangSerialization.a The root cause is probably that opencl-clang doesn't depends on clangSerialization target and opencl-clang is linking its dependencies before clangSerialization is built. So this build error could happen to other clang static libraries. https://github.com/intel/opencl-clang/commit/1bda00e358ce39e9f3083875b05610b85ec294e3 forgot to use add_dependencies. I suggest to revert https://github.com/intel/opencl-clang/commit/1bda00e358ce39e9f3083875b05610b85ec294e3 first, WDYT?
@tylanphear I just take a look at link.txt and it show opencl-clang is linking libclangSerialization.a The root cause is probably that opencl-clang doesn't depends on clangSerialization target and opencl-clang is linking its dependencies before clangSerialization is built. So this build error could happen to other clang static libraries. 1bda00e forgot to use add_dependencies. I suggest to revert 1bda00e first, WDYT?
reverts commit https://github.com/intel/opencl-clang/commit/1bda00e358ce39e9f3083875b05610b85ec294e3 by https://github.com/intel/opencl-clang/pull/476
Closing in favor of #476
after discussion with @zhaomaosu, we think this pr is probably the right fix although it is still unclear why clangSerialization is needed twice in link.txt. clangSerialization is also added to some clang tools CMakeLists.txt So I'll revert https://github.com/intel/opencl-clang/pull/476 and then re-open this PR.
@tylanphear branch tylanphear:fix_downstream_link_error is deleted, could you please restore the branch and re-open this pr?
Reopening as requested by @wenju-he.
The following link error occurs in downstream after 1bda00e358:
This is similar to the link error seen in https://reviews.llvm.org/D157078, which was resolved in the same way (https://reviews.llvm.org/rG36daf3532d91bb3e61d631edceea77ebb8417801).
This patch just adds 'clangSerialization' to the link libraries to resolve the issue.