Page MenuHomePhabricator

[flang] Fix build with BUILD_SHARED_LIBS=ON
ClosedPublic

Authored by serge-sans-paille on Oct 15 2020, 2:01 AM.

Details

Summary

Fix component dependencies specification

Tested with the following cmake flags:

cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=flang\;mlir\;clang -DBUILD_SHARED_LIBS=OFF -DFLANG_BUILD_NEW_DRIVER=OFF
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=flang\;mlir\;clang -DBUILD_SHARED_LIBS=ON -DFLANG_BUILD_NEW_DRIVER=OFF
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=flang\;mlir\;clang -DBUILD_SHARED_LIBS=OFF -DFLANG_BUILD_NEW_DRIVER=ON
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=flang\;mlir\;clang -DBUILD_SHARED_LIBS=ON -DFLANG_BUILD_NEW_DRIVER=ON

Diff Detail

Event Timeline

serge-sans-paille requested review of this revision.Oct 15 2020, 2:01 AM

Still have an issue with -DFLANG_BUILD_NEW_DRIVER=ON -DLLVM_LINK_LLVM_DYLIB=ON

Thank you for fixing this so quickly @serge-sans-paille , that's much appreciated!

Btw, I tested the following:

cmake -DLLVM_TARGETS_TO_BUILD=AArch64 -DFLANG_ENABLE_WERROR=ON -DLLVM_ENABLE_ASSERTIONS=ON -DFLANG_BUILD_NEW_DRIVER=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="llvm;clang;mlir;flang" -DBUILD_SHARED_LIBS=On
awarzynski accepted this revision.Oct 15 2020, 2:34 AM
This revision is now accepted and ready to land.Oct 15 2020, 2:34 AM

Now fixed with

cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=flang\;mlir\;clang -DFLANG_BUILD_NEW_DRIVER=ON -DLLVM_LINK_LLVM_DYLIB=OFF -DBUILD_SHARED_LIBS=OFF
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS=flang\;mlir\;clang -DFLANG_BUILD_NEW_DRIVER=ON -DLLVM_LINK_LLVM_DYLIB=ON

awarzynski accepted this revision.Oct 15 2020, 3:57 AM

Thanks for testing so extensively! LGTM!

Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2020, 4:04 AM