Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial work on refactor to LLVM 9.0 #52

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Initial work on refactor to LLVM 9.0 #52

wants to merge 12 commits into from

Conversation

sdiehl
Copy link
Owner

@sdiehl sdiehl commented Dec 30, 2019

No description provided.

@sdiehl sdiehl added the wip Work in Progress label Dec 30, 2019
@xhliu
Copy link

xhliu commented Apr 21, 2020

Just tried this on LLVM 9.0 and "stack build" fails with many errors. Any estimate on when support for LLVM 9.0 will be coming?

@sdiehl
Copy link
Owner Author

sdiehl commented Apr 21, 2020

Chapter 6 will work. As for when it will be done, that's just a function of when I find the time. You can reference the llvm-hs-examples and the Kaleidoscope repo there for more up to date code.

@xhliu
Copy link

xhliu commented Apr 21, 2020

@sdiehl I tried to build llvm-hs-examples on Mac Catalina, it gave the following errors:

 [114 of 114] Compiling LLVM.PassManager ( src/LLVM/PassManager.hs, .stack-work/dist/x86_64-osx/Cabal-2.4.0.1/build/LLVM/PassManager.o )
    
    /private/var/folders/zg/mkwy5rhs06dbyf6rmxgrrb8w0000gn/T/stack6665/llvm-hs-9.0.0/src/LLVM/Internal/FFI/PassManagerC.cpp:159:69: error:
         error: non-constant-expression cannot be narrowed from type 'LLVMBool' (aka 'int') to 'bool' in initializer list [-Wc  11-narrowing]
                unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
                                                                                   ^~~~~~~
        |
    159 |         unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
        |                                                                     ^
    
    /private/var/folders/zg/mkwy5rhs06dbyf6rmxgrrb8w0000gn/T/stack6665/llvm-hs-9.0.0/src/LLVM/Internal/FFI/PassManagerC.cpp:159:69: error:
         note: insert an explicit cast to silence this issue
                unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
                                                                                   ^~~~~~~
                                                                                   static_cast<bool>( )
        |
    159 |         unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
        |                                                                     ^
    
    /private/var/folders/zg/mkwy5rhs06dbyf6rmxgrrb8w0000gn/T/stack6665/llvm-hs-9.0.0/src/LLVM/Internal/FFI/PassManagerC.cpp:159:78: error:
         error: non-constant-expression cannot be narrowed from type 'LLVMBool' (aka 'int') to 'bool' in initializer list [-Wc  11-narrowing]
                unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
                                                                                            ^~~~~~
        |
    159 |         unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
        |                                                                              ^
    
    /private/var/folders/zg/mkwy5rhs06dbyf6rmxgrrb8w0000gn/T/stack6665/llvm-hs-9.0.0/src/LLVM/Internal/FFI/PassManagerC.cpp:159:78: error:
         note: insert an explicit cast to silence this issue
                unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
                                                                                            ^~~~~~
                                                                                            static_cast<bool>( )
        |
    159 |         unwrap(PM)->add(createMemorySanitizerLegacyPassPass({trackOrigins, recover, kernel}));
        |                                                                              ^
    2 errors generated.
    `gcc' failed in phase `C Compiler'. (Exit code: 1)

I installed llvm-9

> brew install llvm-hs/llvm/llvm-9
> llvm-config --version
9.0.0

Seems I'm missing llvm-hs/llvm-hs@715a330, but I don't know how to get it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants