Code Monkey home page Code Monkey logo

cheerp-meta's Introduction

Cheerp

Discord server GitHub Issues npm

Cheerp is an open-source, permissively licensed, enterprise-grade C/C++ compiler for Web applications. It compiles virtually any C/C++ code to WebAssembly and JavaScript.

Documentation
Issues
Discord server

What is Cheerp?

Cheerp is a C/C++ compiler to WebAssembly and JavaScript, based on and integrated into the LLVM/Clang infrastructure, and featuring numerous custom optimisation steps to maximise performance and minimise size of the compiled JavaScript/WebAssembly output. Thanks to this, Cheerp is the best performing, most optimised C++ to WebAssembly compiler available on the market.

Cheerp is used primarily to port existing C/C++ libraries and applications to HTML5, but can also be used to write high-performance Web applications and WebAssembly components from scratch. Using Cheerp, C/C++ code gets compiled into JavaScript/WebAssembly and optimised, with the right JavaScript interfaces being exposed, and can easily be integrated in a web application.

Repository structure

This repository (cheerp-meta) holds Cheerp's npm packages and tracks Cheerp issues.

Other repositories hold various components of Cheerp:

Licensing

Cheerp is licensed under the Apache 2.0 License with LLVM exceptions, i.e. the same license of upstream LLVM/Clang. It is actively developed and maintained by Leaning Technologies. Commercial support, feature fast tracking, sponsored development and consulting packages are available for Enterprise customers.

cheerp-meta's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cheerp-meta's Issues

regex fails to initialize when using `[]`

When initializing a regex which uses a pattern containing brackets, the generated code fails and claims there's an undefined value at line 3818 of the regex header.

The issue is easily reproducible:

#include <cheerp/client.h>
#include <cheerp/clientlib.h>
#include <regex>

void webMain()
{
  std::regex regexp("[a-z]");
}

This is using the 1.2.1 version.

[[cheerp::jsexport]] improvements

class [[cheerp::jsexport]] Cat {
public:
    int age;
    Cat(int age) : age(age) {}

    void say() {
        console.log(age);
    }
};

in javascript

var cat  = new Cat(10);


// under the hood js object:
cat = {
  get age() { return this.i0; },
  set age(value) { this.i0 = value >> 0; },
  say() { return cppFuncName(this) }
}

How i can create javascript projection of existing C++ object?

class [[cheerp::jsexport]] Cat {
public:
    int age;
    Cat(int age) : age(age) {}
};


int webMain() {
    Cat *cat = new Cat(10); // create C++ object
    
    Object *catObj = new Object(cat); // wrap it to javascript object
    window._set("cat", catObj); // set it to window "cat" propperty
    return 0;
}

in javascript:

cat.age // 10

How can I make something like that? Or I can not? So let's figure out how to implement these things. This is critical for my project, I think not only for my project.

Can cheerp interact with canvas pixel data

I've read through the documentation of cheerp compiler and I see that cheerp allows you to interact with several dom elements even in the C++ "world".

Is it possible to pass an array buffer of image data populated in "regular javascript" with the getImageData command, and pass that data off to cheerp compiled javascript?

I'm basically wondering if you can use cheerp's speed to improve canvas pixel manipulation performance. Thank you!

What is the recommended way of passing around client::String in C++ code?

Let's say my C++ code has an internal interface (meaning, a function called by other C++ code) that takes a string as an argument. To minimize expensive conversions between std::string and client::String, I want to use client::String as the string type.

What is the recommended way of passing around the client::String?

The first thing I tried is to pass by const reference, the way the cheerp APIs do:

void myFunction(const client::String& s);

However, I ran into a few issues:

  • I cannot call certain methods on s, like indexOf(). (This one's likely a bug).
  • Some APIs like Array::push() require an Object*. I need to cast away constness to get an Object* from a const String&.

The next thing I tried is to pass by pointer:

void myFunction(client::String* s);

However, this has its issues too:

  • I can no longer pass a string literal as an argument.

What do you recommend using?

Global String objects do not work

When I compile the following program:

#include <cheerp/client.h>
#include <cheerp/clientlib.h>

using namespace client;

String foo{"foo"};

void webMain()
{
    document.addEventListener("DOMContentLoaded", cheerp::Callback([](Event*)
    {
        console.log(String("performing getElementById on ").concat(&foo));
        HTMLElement* result = document.getElementById(foo);
        if (!result)
            console.log("element does not exist");
    }));
}

and use it with the following HTML file:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <script src="test.js"></script>
  </head>
  <body><div id="foo"></body>
</html>

I get the following printed in the devtools console:

"performing getElementById on [object Object]"
"element does not exist"

It works if I make foo a local variable, or a pointer to a heap-allocated String. Why does a global String object not work?

Add Support CLion IDE and Debugger

Please add Support CLion IDE and Debugger.

  1. I mean, I want to press the "run" in the top of the IDE, and the application must compile and run in the browser.

  2. I want to put a breakpoint in IDE, click debug, and make it run in a browser, and the browser used javascript debugger and sourcemaps, all automatically broadcast from the browser debugger, to the embedded IDE C++ debugger, to debug code without leaving from IDE.

  3. I want to have Webpack support and auto incremental compile, and hot module reload, without reloading the entire page.

It's much more important than adding new features and innovations into Cheerp. If you do not add support infrastructures, all Cheerp features do not have sense.

All languages are broadcast in javascript, are integrated into the existing javascript infrastructure. I think C++ should not be an exception.

It sounds like magic, but it's computers, they all virtually, so anything is possible. I am willing to even help you to realize all this. =)

image

image

image

etc.

Error while compiling cheerp-llvm

Hi,
when i try to build cheerp-llvm on a gentoo system i get the error below, I have tried several times and the copiler always bails out but on different source files.

Regards Johan

[ 12%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o
[ 12%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ToolOutputFile.cpp.o
lib/MC/CMakeFiles/LLVMMC.dir/build.make:86: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/ELFObjectWriter.cpp.o' failed
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:86: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFAbbreviationDeclaration.cpp.o' failed
lib/LineEditor/CMakeFiles/LLVMLineEditor.dir/build.make:62: recipe for target 'lib/LineEditor/CMakeFiles/LLVMLineEditor.dir/LineEditor.cpp.o' failed
lib/Object/CMakeFiles/LLVMObject.dir/build.make:110: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/COFFObjectFile.cpp.o' failed
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/ExecutionEngine/MCJIT/CMakeFiles/LLVMMCJIT.dir/build.make:86: recipe for target 'lib/ExecutionEngine/MCJIT/CMakeFiles/LLVMMCJIT.dir/SectionMemoryManager.cpp.o' failed
lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/build.make:86: recipe for target 'lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o' failed
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:62: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmLexer.cpp.o' failed
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:86: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/APInt.cpp.o' failed
lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/build.make:86: recipe for target 'lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/MCRelocationInfo.cpp.o' failed
lib/LTO/CMakeFiles/LLVMLTO.dir/build.make:86: recipe for target 'lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o' failed
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:110: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/Record.cpp.o' failed
utils/unittest/CMakeFiles/gtest.dir/build.make:62: recipe for target 'utils/unittest/CMakeFiles/gtest.dir/googletest/src/gtest-all.cc.o' failed
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:86: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfReader.cpp.o' failed
lib/Target/CMakeFiles/LLVMTarget.dir/build.make:86: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/TargetIntrinsicInfo.cpp.o' failed
lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/build.make:86: recipe for target 'lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/ExecutionEngineBindings.cpp.o' failed
lib/Option/CMakeFiles/LLVMOption.dir/build.make:62: recipe for target 'lib/Option/CMakeFiles/LLVMOption.dir/Arg.cpp.o' failed
lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/build.make:86: recipe for target 'lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/LLParser.cpp.o' failed
utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/build.make:62: recipe for target 'utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/PerfectShuffle.cpp.o' failed
lib/IRReader/CMakeFiles/LLVMIRReader.dir/build.make:62: recipe for target 'lib/IRReader/CMakeFiles/LLVMIRReader.dir/IRReader.cpp.o' failed
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/build.make:86: recipe for target 'lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldChecker.cpp.o' failed
CMakeFiles/Makefile2:3807: recipe for target 'utils/unittest/UnitTestMain/CMakeFiles/gtest_main.dir/all' failed
make[1]: *** [utils/unittest/UnitTestMain/CMakeFiles/gtest_main.dir/all] Error 2
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/COFFObjectFile.cpp.o] Hangup
make[2]: *** [lib/ExecutionEngine/MCJIT/CMakeFiles/LLVMMCJIT.dir/SectionMemoryManager.cpp.o] Hangup
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFAbbreviationDeclaration.cpp.o] Hangup
make[2]: *** [lib/LineEditor/CMakeFiles/LLVMLineEditor.dir/LineEditor.cpp.o] Hangup
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/APInt.cpp.o] Hangup
make[2]: *** [lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriter.cpp.o] Hangup
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/ELFObjectWriter.cpp.o] Hangup
make[2]: *** [lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/MCRelocationInfo.cpp.o] Hangup
make[2]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/TargetIntrinsicInfo.cpp.o] Hangup
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/Record.cpp.o] Hangup
make[2]: *** [lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o] Hangup
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfReader.cpp.o] Hangup
make[2]: *** [lib/Option/CMakeFiles/LLVMOption.dir/Arg.cpp.o] Hangup
make[2]: *** [utils/unittest/CMakeFiles/gtest.dir/googletest/src/gtest-all.cc.o] Hangup
make[2]: *** [lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/ExecutionEngineBindings.cpp.o] Hangup
make[2]: *** [lib/IRReader/CMakeFiles/LLVMIRReader.dir/IRReader.cpp.o] Hangup
make[2]: *** [lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/LLParser.cpp.o] Hangup
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmLexer.cpp.o] Hangup
make[2]: *** [utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/PerfectShuffle.cpp.o] Hangup
make[2]: *** [lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldChecker.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/Object/CMakeFiles/LLVMObject.dir/build.make:62: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/Archive.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/Archive.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:134: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/COFFYAML.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/COFFYAML.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:158: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/ELF.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/ELF.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:182: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/ELFObjectFile.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/ELFObjectFile.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:206: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/ELFYAML.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/ELFYAML.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:230: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/Error.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/Error.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:254: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/IRObjectFile.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/IRObjectFile.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:278: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/MachOObjectFile.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/MachOObjectFile.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:302: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/MachOUniversal.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/MachOUniversal.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:350: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/ObjectFile.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/ObjectFile.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:326: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/Object.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/Object.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:374: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/RecordStreamer.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/RecordStreamer.cpp.o] Hangup
lib/Object/CMakeFiles/LLVMObject.dir/build.make:398: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/SymbolicFile.cpp.o' failed
make[2]: *** [lib/Object/CMakeFiles/LLVMObject.dir/SymbolicFile.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:110: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFAcceleratorTable.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFAcceleratorTable.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:134: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFCompileUnit.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFCompileUnit.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:158: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFContext.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFContext.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:182: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugAbbrev.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugAbbrev.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:206: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugArangeSet.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugArangeSet.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:230: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugAranges.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugAranges.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:254: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugFrame.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugFrame.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:278: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugInfoEntry.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugInfoEntry.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:302: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugLine.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugLine.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:326: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugLoc.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugLoc.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:350: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugRangeList.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFDebugRangeList.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:398: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFTypeUnit.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFTypeUnit.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:374: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFFormValue.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFFormValue.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:422: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFUnit.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/DWARFUnit.cpp.o] Hangup
lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/build.make:446: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/SyntaxHighlighting.cpp.o' failed
make[2]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/SyntaxHighlighting.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:62: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:110: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/APSInt.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:134: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ARMBuildAttrs.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:182: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Allocator.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:158: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ARMWinEH.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ARMWinEH.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:206: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/BlockFrequency.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/BlockFrequency.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:230: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/BranchProbability.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/BranchProbability.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:254: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/circular_raw_ostream.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/circular_raw_ostream.cpp.o] Hangup
CMakeFiles/Makefile2:3752: recipe for target 'utils/unittest/CMakeFiles/gtest.dir/all' failed
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:278: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:302: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Compression.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Compression.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:326: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTF.c.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:350: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTFWrapper.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTFWrapper.cpp.o] Hangup
make[1]: *** [utils/unittest/CMakeFiles/gtest.dir/all] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:374: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/CrashRecoveryContext.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:398: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/DataExtractor.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/DataExtractor.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:446: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Debug.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Debug.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:422: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/DataStream.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/DataStream.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:470: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/DeltaAlgorithm.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/DeltaAlgorithm.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:494: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:518: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Dwarf.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Dwarf.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:542: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:566: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/FileUtilities.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/FileUtilities.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:590: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/FileOutputBuffer.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/FileOutputBuffer.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:614: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:638: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/FormattedStream.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/FormattedStream.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:662: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/GraphWriter.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/GraphWriter.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:686: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Hashing.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Hashing.cpp.o] Hangup
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:134: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/SetTheory.cpp.o' failed
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:710: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/IntEqClasses.cpp.o' failed
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/SetTheory.cpp.o] Hangup
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/IntEqClasses.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:758: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/IntrusiveRefCntPtr.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/IntrusiveRefCntPtr.cpp.o] Hangup
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:86: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/Main.cpp.o' failed
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/Main.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:734: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o] Hangup
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:158: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/StringMatcher.cpp.o' failed
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/StringMatcher.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:782: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/IsInf.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/IsInf.cpp.o] Hangup
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:206: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGLexer.cpp.o' failed
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGLexer.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:806: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/IsNAN.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/IsNAN.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:830: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/LEB128.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/LEB128.cpp.o] Hangup
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:182: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/TableGenBackend.cpp.o' failed
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/TableGenBackend.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:878: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Locale.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Locale.cpp.o] Hangup
lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:230: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o' failed
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:854: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/LineIterator.cpp.o' failed
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/TGParser.cpp.o] Hangup
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/LineIterator.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:902: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/LockFileManager.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/LockFileManager.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:926: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ManagedStatic.cpp.o' failed
make[2]: *** wait: No child processes. Stop.
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ManagedStatic.cpp.o] Hangup
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:950: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/MathExtras.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/MathExtras.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:974: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/MemoryBuffer.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/MemoryBuffer.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:998: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/MemoryObject.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/MemoryObject.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1022: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/MD5.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/MD5.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1046: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Options.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Options.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1070: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/PluginLoader.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/PluginLoader.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1094: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/PrettyStackTrace.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/PrettyStackTrace.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1118: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/RandomNumberGenerator.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/RandomNumberGenerator.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1142: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Regex.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Regex.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1166: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ScaledNumber.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ScaledNumber.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1190: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/SmallPtrSet.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/SmallPtrSet.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1214: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/SmallVector.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/SmallVector.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1238: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/SourceMgr.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/SourceMgr.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1262: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/SpecialCaseList.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/SpecialCaseList.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1286: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Statistic.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Statistic.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1310: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/StreamingMemoryObject.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/StreamingMemoryObject.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1502: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Triple.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Triple.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1334: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/StringExtras.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/StringExtras.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1526: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Twine.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Twine.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1358: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/StringMap.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/StringMap.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1550: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Unicode.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Unicode.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1574: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/YAMLParser.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/YAMLParser.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1598: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/YAMLTraits.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/YAMLTraits.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:110: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAsmBackend.cpp.o' failed
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1382: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/StringPool.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/StringPool.cpp.o] Hangup
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAsmBackend.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1406: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/StringRef.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/StringRef.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1622: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/raw_os_ostream.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/raw_os_ostream.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:134: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfo.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfo.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1430: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/SystemUtils.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/SystemUtils.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:158: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfoCOFF.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfoCOFF.cpp.o] Hangup
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1454: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/Timer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:206: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfoELF.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfoELF.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
lib/MC/CMakeFiles/LLVMMC.dir/build.make:182: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfoDarwin.cpp.o' failed
make[2]: *** wait: No child processes. Stop.
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAsmInfoDarwin.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:230: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAsmStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAsmStreamer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:254: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCAssembler.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCAssembler.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:302: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCCodeGenInfo.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCCodeGenInfo.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:350: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCDwarf.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCDwarf.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:374: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCELF.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCELF.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:326: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCContext.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCContext.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:398: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCELFObjectTargetWriter.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCELFObjectTargetWriter.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:422: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCELFStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCELFStreamer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:446: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCExpr.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCExpr.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:470: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCInst.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCInst.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:518: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCInstrAnalysis.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCInstrAnalysis.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:494: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCInstPrinter.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCInstPrinter.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:566: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCLinkerOptimizationHint.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCLinkerOptimizationHint.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:542: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCLabel.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCLabel.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:590: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCMachOStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCMachOStreamer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:614: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCMachObjectTargetWriter.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCMachObjectTargetWriter.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:638: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCNullStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCNullStreamer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:662: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCObjectFileInfo.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCObjectFileInfo.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:686: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCObjectStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCObjectStreamer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:710: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCObjectWriter.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCObjectWriter.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:734: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCRegisterInfo.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCRegisterInfo.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:758: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSection.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSection.cpp.o] Hangup
CMakeFiles/Makefile2:3512: recipe for target 'utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/all' failed
lib/MC/CMakeFiles/LLVMMC.dir/build.make:782: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSectionCOFF.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSectionCOFF.cpp.o] Hangup
make[1]: *** [utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/all] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:806: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSectionELF.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSectionELF.cpp.o] Hangup
CMakeFiles/Makefile2:3237: recipe for target 'lib/LineEditor/CMakeFiles/LLVMLineEditor.dir/all' failed
lib/MC/CMakeFiles/LLVMMC.dir/build.make:830: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSectionMachO.cpp.o' failed
make[1]: *** [lib/LineEditor/CMakeFiles/LLVMLineEditor.dir/all] Hangup
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSectionMachO.cpp.o] Hangup
CMakeFiles/Makefile2:527: recipe for target 'lib/IRReader/CMakeFiles/LLVMIRReader.dir/all' failed
lib/MC/CMakeFiles/LLVMMC.dir/build.make:878: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSubtargetInfo.cpp.o' failed
make[1]: *** [lib/IRReader/CMakeFiles/LLVMIRReader.dir/all] Hangup
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSubtargetInfo.cpp.o] Hangup
CMakeFiles/Makefile2:1395: recipe for target 'lib/Linker/CMakeFiles/LLVMLinker.dir/all' failed
lib/MC/CMakeFiles/LLVMMC.dir/build.make:854: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCStreamer.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:86: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o' failed
lib/MC/CMakeFiles/LLVMMC.dir/build.make:902: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSymbol.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSymbol.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:926: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCSymbolizer.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/AsmParser.cpp.o] Hangup
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCSymbolizer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:974: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCValue.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCValue.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:110: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/COFFAsmParser.cpp.o' failed
lib/MC/CMakeFiles/LLVMMC.dir/build.make:950: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCTargetOptions.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/COFFAsmParser.cpp.o] Hangup
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCTargetOptions.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1022: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCWinEH.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCWinEH.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:134: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/DarwinAsmParser.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/DarwinAsmParser.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:998: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MCWin64EH.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MCWin64EH.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:182: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmLexer.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmLexer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1070: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/StringTableBuilder.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/StringTableBuilder.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:158: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/ELFAsmParser.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/ELFAsmParser.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1046: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/MachObjectWriter.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/MachObjectWriter.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:206: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmParser.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmParser.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1118: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/WinCOFFObjectWriter.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/WinCOFFObjectWriter.cpp.o] Hangup
lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/build.make:230: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmParserExtension.cpp.o' failed
make[2]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MCAsmParserExtension.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1094: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/SubtargetFeature.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/SubtargetFeature.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1142: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/WinCOFFStreamer.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/WinCOFFStreamer.cpp.o] Hangup
lib/MC/CMakeFiles/LLVMMC.dir/build.make:1166: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/YAML.cpp.o' failed
make[2]: *** [lib/MC/CMakeFiles/LLVMMC.dir/YAML.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
make[1]: *** [lib/Linker/CMakeFiles/LLVMLinker.dir/all] Error 2
CMakeFiles/Makefile2:1253: recipe for target 'lib/Transforms/Hello/CMakeFiles/LLVMHello.dir/all' failed
make[1]: *** [lib/Transforms/Hello/CMakeFiles/LLVMHello.dir/all] Error 2
CMakeFiles/Makefile2:221: recipe for target 'lib/TableGen/CMakeFiles/LLVMTableGen.dir/all' failed
make[1]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/all] Error 2
CMakeFiles/Makefile2:2070: recipe for target 'lib/ExecutionEngine/MCJIT/CMakeFiles/LLVMMCJIT.dir/all' failed
make[1]: *** [lib/ExecutionEngine/MCJIT/CMakeFiles/LLVMMCJIT.dir/all] Error 2
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/build.make:134: recipe for target 'lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldMachO.cpp.o' failed
CMakeFiles/Makefile2:1897: recipe for target 'lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/all' failed
make[1]: *** [lib/DebugInfo/CMakeFiles/LLVMDebugInfo.dir/all] Error 2
make[2]: *** [lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldMachO.cpp.o] Hangup
CMakeFiles/Makefile2:1677: recipe for target 'lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/all' failed
make[1]: *** [lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/all] Error 2
lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/build.make:110: recipe for target 'lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldELF.cpp.o' failed
CMakeFiles/Makefile2:1562: recipe for target 'lib/LTO/CMakeFiles/LLVMLTO.dir/all' failed
make[2]: *** [lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/RuntimeDyldELF.cpp.o] Hangup
make[1]: *** [lib/LTO/CMakeFiles/LLVMLTO.dir/all] Error 2
CMakeFiles/Makefile2:1787: recipe for target 'lib/Object/CMakeFiles/LLVMObject.dir/all' failed
make[1]: *** [lib/Object/CMakeFiles/LLVMObject.dir/all] Error 2
CMakeFiles/Makefile2:1622: recipe for target 'lib/MC/CMakeFiles/LLVMMC.dir/all' failed
make[2]: *** wait: No child processes. Stop.
make[1]: *** [lib/MC/CMakeFiles/LLVMMC.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/build.make:134: recipe for target 'lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/ValueEnumerator.cpp.o' failed
make[2]: *** [lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/ValueEnumerator.cpp.o] Hangup
lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/build.make:110: recipe for target 'lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriterPass.cpp.o' failed
make[2]: *** [lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/BitcodeWriterPass.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
CMakeFiles/Makefile2:2125: recipe for target 'lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/all' failed
make[1]: *** [lib/ExecutionEngine/RuntimeDyld/CMakeFiles/LLVMRuntimeDyld.dir/all] Error 2
lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/build.make:110: recipe for target 'lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/MCExternalSymbolizer.cpp.o' failed
make[2]: *** [lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/MCExternalSymbolizer.cpp.o] Hangup
lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/build.make:134: recipe for target 'lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/MCDisassembler.cpp.o' failed
make[2]: *** [lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/MCDisassembler.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
CMakeFiles/Makefile2:828: recipe for target 'lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/all' failed
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [lib/Bitcode/Writer/CMakeFiles/LLVMBitWriter.dir/all] Error 2
make[2]: *** wait: No child processes. Stop.
lib/Target/CMakeFiles/LLVMTarget.dir/build.make:110: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/TargetLibraryInfo.cpp.o' failed
make[2]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/TargetLibraryInfo.cpp.o] Hangup
lib/Target/CMakeFiles/LLVMTarget.dir/build.make:134: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/TargetLoweringObjectFile.cpp.o' failed
make[2]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/TargetLoweringObjectFile.cpp.o] Hangup
lib/Target/CMakeFiles/LLVMTarget.dir/build.make:158: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/TargetMachine.cpp.o' failed
make[2]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/TargetMachine.cpp.o] Hangup
lib/Target/CMakeFiles/LLVMTarget.dir/build.make:182: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/TargetMachineC.cpp.o' failed
make[2]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/TargetMachineC.cpp.o] Hangup
lib/Target/CMakeFiles/LLVMTarget.dir/build.make:206: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/TargetSubtargetInfo.cpp.o' failed
make[2]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/TargetSubtargetInfo.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:110: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfWriter.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfWriter.cpp.o] Hangup
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:134: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/CoverageMapping.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/CoverageMapping.cpp.o] Hangup
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:158: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/CoverageMappingWriter.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/CoverageMappingWriter.cpp.o] Hangup
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:182: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/CoverageMappingReader.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/CoverageMappingReader.cpp.o] Hangup
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:206: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProf.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProf.cpp.o] Hangup
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:254: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfWriter.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfWriter.cpp.o] Hangup
lib/ProfileData/CMakeFiles/LLVMProfileData.dir/build.make:230: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfReader.cpp.o' failed
make[2]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfReader.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/build.make:110: recipe for target 'lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/Parser.cpp.o' failed
make[2]: *** [lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/Parser.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
CMakeFiles/Makefile2:1732: recipe for target 'lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/all' failed
make[1]: *** [lib/MC/MCDisassembler/CMakeFiles/LLVMMCDisassembler.dir/all] Error 2
CMakeFiles/Makefile2:2188: recipe for target 'lib/Target/CMakeFiles/LLVMTarget.dir/all' failed
make[1]: *** [lib/Target/CMakeFiles/LLVMTarget.dir/all] Error 2
CMakeFiles/Makefile2:3292: recipe for target 'lib/ProfileData/CMakeFiles/LLVMProfileData.dir/all' failed
make[1]: *** [lib/ProfileData/CMakeFiles/LLVMProfileData.dir/all] Error 2
lib/Option/CMakeFiles/LLVMOption.dir/build.make:110: recipe for target 'lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o' failed
make[2]: *** [lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o] Hangup
lib/Option/CMakeFiles/LLVMOption.dir/build.make:134: recipe for target 'lib/Option/CMakeFiles/LLVMOption.dir/OptTable.cpp.o' failed
make[2]: *** [lib/Option/CMakeFiles/LLVMOption.dir/OptTable.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/build.make:62: recipe for target 'lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/ExecutionEngine.cpp.o' failed
make[2]: *** [lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/ExecutionEngine.cpp.o] Hangup
lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/build.make:110: recipe for target 'lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/GDBRegistrationListener.cpp.o' failed
make[2]: *** [lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/GDBRegistrationListener.cpp.o] Hangup
lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/build.make:134: recipe for target 'lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/RTDyldMemoryManager.cpp.o' failed
make[2]: *** [lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/RTDyldMemoryManager.cpp.o] Hangup
make[2]: *** wait: No child processes. Stop.
make[2]: *** Waiting for unfinished jobs....
make[2]: *** wait: No child processes. Stop.
CMakeFiles/Makefile2:1842: recipe for target 'lib/Option/CMakeFiles/LLVMOption.dir/all' failed
make[1]: *** [lib/Option/CMakeFiles/LLVMOption.dir/all] Error 2
CMakeFiles/Makefile2:3182: recipe for target 'lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/all' failed
make[1]: *** [lib/AsmParser/CMakeFiles/LLVMAsmParser.dir/all] Error 2
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1478: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/ToolOutputFile.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/ToolOutputFile.cpp.o] Hangup
CMakeFiles/Makefile2:1960: recipe for target 'lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/all' failed
make[1]: *** [lib/ExecutionEngine/CMakeFiles/LLVMExecutionEngine.dir/all] Error 2
lib/Support/CMakeFiles/LLVMSupport.dir/build.make:1646: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/raw_ostream.cpp.o' failed
make[2]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/raw_ostream.cpp.o] Error 2
CMakeFiles/Makefile2:166: recipe for target 'lib/Support/CMakeFiles/LLVMSupport.dir/all' failed
make[1]: *** [lib/Support/CMakeFiles/LLVMSupport.dir/all] Hangup
Makefile:149: recipe for target 'all' failed
make: *** [all] Hangup

Bad codegen with [[jsexport]]

In this example, the compiled function c has 10 parameters, but is called with 9 (the last parameter is omitted from the generated javascript function Test.prototype.Perform)

example.cpp:

class [[cheerp::jsexport]] Test {
    int _keep;

public:
    Test() {
        _keep = 1;
    }

    void Perform(float *fs, int a, int b, int c, float d, float e, float f, float g) {
        while (a != b) {
            fs[a++] += d * e + f * g;
            if (a >= c) {
                a -= c;
            }
        }
    }
};

void webMain() {
}

out.js:

"use strict"; /*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
function Test() {
    this.i0 = 0;
    this.d = [this];
    e(this);
}
Test.prototype.Perform = function(a0, a1, a2, a3, a4, a5, a6, a7) {
    return c(this, a0, a1, a2, a3, a4, a5, a6, a7);
};
var aSlot = null;
var oSlot = 0;
var nullArray = [null];
var nullObj = {
    d: nullArray,
    o: 0
};

function e(a) {
    a.i0 = 1;
    return;
}

function c(p, n, o, q, m, l, k, j, i, h) {
    var label = 0;
    if (((q >> 0) === (m >> 0))) {
        return;
    }
    var f = ((k * j) + (i * h));
    var a = q;
    while (1) {
        var b = ((a >> 0) + (1 >> 0) >> 0);
        var g = +(n[(o >> 0) + (a >> 0) >> 0]);
        n[(o >> 0) + (a >> 0) >> 0] = (f + g);
        var a = ((b - (((b >> 0) < (l >> 0)) ? 0 : l)) >> 0);
        if (((a >> 0) === (m >> 0))) {
            break;
        }
    }
    return;
}

function d() {
    return;
}
d();

--version:

% /c/cheerp/bin/clang++ --version
Cheerp 1.2.1 clang version 3.7.0 (https://github.com/leaningtech/cheerp-clang.git 5c156e44208e12c1bd5c613f76a730503c276900) (https://github.com/leaningtech/cheerp-llvm.git 7a442eaa8cb978415c1c895fd25af9bce5e15ae5) (based on LLVM 3.7.0svn)
Target: i686-pc-windows-gnu
Thread model: posix

How can I complie c libs with cheerp

clang -target cheerp *****.c -o *****.bc
but there are many errors
such as

  • C:\cheerp\bin\clang -std=c11 -O3 -c -target cheerp -I..\include -I..\ ...
  • - CategoryInfo          : NotSpecified: (In file included from bits.c:41::String) [], RemoteException
    - FullyQualifiedErrorId : NativeCommandError
    
    

./os_support.h:73:19: error: Cheerp: Memory operations require the actual type of the pointers. Pass the typed pointers instead of a generic void*
return realloc(ptr, size);

Object::set_() error

Object *obj = new Object();

obj->set_("prop", 11); // ERROR
obj->set_("prop", "string"); // ERROR
obj->set_("prop", new String("string")); // ERROR
obj->set_("prop", new Number(1)); // ERROR
Function->prototype.set_("method", Callback([]{ })) // ERROR

client::String::indexOf() should be const

Currently, client::String::indexOf() is not const, even though logically it should be. This is unfortunate because it means I cannot call indexOf() on a const client::String& parameter to a function.

Your project is incredible, truly incredible! But why is it so popular?

Let's think about where and on what sites we should write overview on your technology, I can write on the Russian IT sites a several of reviews. Maybe you should do "advertising"? After all, technology, whatever it was not cool, is, above all, for the people! For this we need more people! More community!

Cannot create an HTMLOptionElement

I'm unable to create an HTMLOptionElement object from C++ code.

new client::HTMLOptionElement() produces the following error in the console:

TypeError: Illegal constructor.

The Web API docs say that HTMLOptionElement needs to be constructed using the special constructor Option, but this does not appear in the Cheerp API.

I notice there is an HTMLOptionElement::create() method, but it requires a pre-existing HTMLOptionElement object.

Compile cheerp itself

Would it be possible to self-host cheerp compiling itself to Javascript and running it with Node.js, and ideally having it published as a npm package? I'm planning to use it on NodeOS as an alternative to GCC to install compiled modules from inside itself.

Cheerp: Field not supported in union

Hey Guys,

I'm trying to build SQLite in Cheerp, hoping it lives up to it's promise of smaller file sizes and improves upon Emscripten's compliation that's a whopping 2MB.

Anyway, I can compile SQLite3 on my linux machine otherwise, but Cheerp kicks this out:
sqlite3.c:17814:16: error: Cheerp: Field not supported in union VdbeFrame *pFrame; /* Used when flags==MEM_Frame */ ^ sqlite3.c:14107:14: error: Cheerp: Field not supported in union FuncDef *pHash; /* Next with a different name but the same hash */ ^ sqlite3.c:43182:13: error: Cheerp: Field not supported in union Bitvec *apSub[BITVEC_NPTR]; /* Recursive representation */

And it goes on like this for a bit...

I found another issue that was quite old where your support stated that Cheerp doesnt' support unions using non standard types. It's interesting because the Bullet library seems to be using unions in the same way and that's compiling just fine, so just curious what the difference is if there is one.

Thanks for the help!

Segfault when running opt with PreExecute on libstdlibs

Hey,

I am currently trying to compile cheerp and everything went good so far. But when optimizing the standard libs I get a segmentation fault. Here is the log:

#0 0x561bc6860421 llvm::sys::PrintStackTrace(_IO_FILE*) (/opt/cheerp/bin/opt+0xa7a421)
#1 0x561bc685e449 SignalHandler(int) (/opt/cheerp/bin/opt+0xa78449)
#2 0x7f5e722ebe80 __restore_rt (/usr/lib/libpthread.so.0+0x10e80)
#3 0x561bc64eee03 llvm::GlobalValue::isDeclaration() const (/opt/cheerp/bin/opt+0x708e03)
#4 0x561bc696ba98 llvm::Interpreter::callFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) (/opt/cheerp/bin/opt+0xb85a98)
#5 0x561bc696c294 llvm::Interpreter::visitCallSite(llvm::CallSite) (/opt/cheerp/bin/opt+0xb86294)
#6 0x561bc696c9a2 llvm::Interpreter::run() (/opt/cheerp/bin/opt+0xb869a2)
#7 0x561bc695a765 llvm::Interpreter::runFunction(llvm::Function*, std::vector<llvm::GenericValue, std::allocator<llvm::GenericValue> > const&) (/opt/cheerp/bin/opt+0xb74765)
#8 0x561bc668ae46 cheerp::PreExecute::runOnModule(llvm::Module&) (/opt/cheerp/bin/opt+0x8a4e46)
#9 0x561bc65143a9 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cheerp/bin/opt+0x72e3a9)
#10 0x561bc5fd9d75 main (/opt/cheerp/bin/opt+0x1f3d75)
#11 0x7f5e714a7710 __libc_start_main (/usr/lib/libc.so.6+0x20710)
#12 0x561bc5fecab9 _start (/opt/cheerp/bin/opt+0x206ab9)
Stack dump:
0.  Program arguments: /opt/cheerp/bin/opt -O3 -PreExecute libstdlibs.full.bc -o libstdlibs.bc 
1.  Running pass 'CheerpPreExecute' on module 'libstdlibs.full.bc'.
[1]    5874 segmentation fault (core dumped)  /opt/cheerp/bin/opt -O3 -PreExecute libstdlibs.full.bc -o libstdlibs.b

EDIT:
I am using the upstream source not a tagged one.

new TArray<String>() does not work

There is a TArray<T> class in the cheerp API, but when I try to create an instance of one using e.g. new TArray<String>() I get:

ReferenceError: TArray is not defined

std::string concatenation broken

This code

#include <cheerp/clientlib.h>
#include <string>

void webMain()
{
    const auto text = "ABCDEFGHIJKLMNOPQRSTUVW" + std::to_string(2000 / 3.0);
    client::console.log(text.c_str());
}

outputs ABCDEFGHIJK to the console, this is clearly incorrect.

Surprisingly, almost identical code

#include <cheerp/clientlib.h>
#include <string>

void webMain()
{
    const auto text = "ABCDEFGHIJKLMNOPQRSTUVW" + std::to_string(2 / 3.0);
    client::console.log(text.c_str());
}

produces correct answer which is ABCDEFGHIJKLMNOPQRSTUVW0.666667

Compiled with Cheerp 1.2.1 on Windows and tested with Firefox 46.0.1

Compilation error

Using gcc 6.2.1
output is:

[ 4%] Building CXX object lib/TableGen/CMakeFiles/LLVMTableGen.dir/Main.cpp.o
In file included from /usr/include/c++/6.2.1/bits/concept_check.h:56:0,
from /usr/include/c++/6.2.1/bits/move.h:34,
from /usr/include/c++/6.2.1/bits/stl_pair.h:59,
from /usr/include/c++/6.2.1/utility:70,
from /usr/include/c++/6.2.1/algorithm:60,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/StringRef.h:13,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGLexer.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/boost_concept_check.h: In instantiation of ‘void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints() [with _Tp = std::unique_ptrllvm::Record]’:
/usr/include/c++/6.2.1/bits/stl_map.h:108:7: required from ‘class std::mapstd::__cxx11::basic_string<char, std::unique_ptrllvm::Record >’
/home/nicole/software/cheerp/cheerp-llvm/include/llvm/TableGen/Record.h:1677:13: required from here
/usr/include/c++/6.2.1/bits/boost_concept_check.h:205:28: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::Record; _Dp = std::default_deletellvm::Record]’
_Tp __b _IsUnused(__a);
^
In file included from /usr/include/c++/6.2.1/memory:81:0,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/STLExtras.h:25,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/ArrayRef.h:14,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/Support/SourceMgr.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/unique_ptr.h:356:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~
In file included from /usr/include/c++/6.2.1/bits/concept_check.h:56:0,
from /usr/include/c++/6.2.1/bits/move.h:34,
from /usr/include/c++/6.2.1/bits/stl_pair.h:59,
from /usr/include/c++/6.2.1/utility:70,
from /usr/include/c++/6.2.1/algorithm:60,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/StringRef.h:13,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGLexer.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/boost_concept_check.h:206:11: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::Record; _Dp = std::default_deletellvm::Record]’
__a = __a; // require assignment operator
~~~~^~~~~
In file included from /usr/include/c++/6.2.1/memory:81:0,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/STLExtras.h:25,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/ArrayRef.h:14,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/Support/SourceMgr.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/unique_ptr.h:357:19: note: declared here
unique_ptr& operator=(const unique_ptr&) = delete;
^~~~~~~~
In file included from /usr/include/c++/6.2.1/bits/concept_check.h:56:0,
from /usr/include/c++/6.2.1/bits/move.h:34,
from /usr/include/c++/6.2.1/bits/stl_pair.h:59,
from /usr/include/c++/6.2.1/utility:70,
from /usr/include/c++/6.2.1/algorithm:60,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/StringRef.h:13,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGLexer.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/boost_concept_check.h: In instantiation of ‘void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints() [with _Tp = std::unique_ptrllvm::MultiClass]’:
/usr/include/c++/6.2.1/bits/stl_map.h:108:7: required from ‘class std::mapstd::__cxx11::basic_string<char, std::unique_ptrllvm::MultiClass >’
/home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:58:54: required from here
/usr/include/c++/6.2.1/bits/boost_concept_check.h:205:28: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>::unique_ptr(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::MultiClass; _Dp = std::default_deletellvm::MultiClass]’
_Tp __b _IsUnused(__a);
^
In file included from /usr/include/c++/6.2.1/memory:81:0,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/STLExtras.h:25,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/ArrayRef.h:14,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/Support/SourceMgr.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/unique_ptr.h:356:7: note: declared here
unique_ptr(const unique_ptr&) = delete;
^~~~~~~~~~
In file included from /usr/include/c++/6.2.1/bits/concept_check.h:56:0,
from /usr/include/c++/6.2.1/bits/move.h:34,
from /usr/include/c++/6.2.1/bits/stl_pair.h:59,
from /usr/include/c++/6.2.1/utility:70,
from /usr/include/c++/6.2.1/algorithm:60,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/StringRef.h:13,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGLexer.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:17,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/boost_concept_check.h:206:11: error: use of deleted function ‘std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = llvm::MultiClass; _Dp = std::default_deletellvm::MultiClass]’
__a = __a; // require assignment operator
~~~~^~~~~
In file included from /usr/include/c++/6.2.1/memory:81:0,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/STLExtras.h:25,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/ADT/ArrayRef.h:14,
from /home/nicole/software/cheerp/cheerp-llvm/include/llvm/Support/SourceMgr.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/TGParser.h:19,
from /home/nicole/software/cheerp/cheerp-llvm/lib/TableGen/Main.cpp:18:
/usr/include/c++/6.2.1/bits/unique_ptr.h:357:19: note: declared here
unique_ptr& operator=(const unique_ptr&) = delete;
^~~~~~~~
make[2]: *** [lib/TableGen/CMakeFiles/LLVMTableGen.dir/build.make:87: lib/TableGen/CMakeFiles/LLVMTableGen.dir/Main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:222: lib/TableGen/CMakeFiles/LLVMTableGen.dir/all] Error 2
make: *** [Makefile:150: all] Error 2

Avoid polluting the global scope by placing compiler output into an IIFE

It's possible that the compiled C++ code included in a page might not be the only included JS file. Right now the output of the compiler pollutes the global name space with a lot of single-letter function names that would best be gathered inside an Immediately-Invoked Function Expression (IIIFE). This is particularly important since the "use strict" pragma is applied globally to all scripts which follow the inclusion on the page instead of being restricted to just the Cheerp-generated code.

At some point perhaps Cheerp will generate E6 modules, but until then, IIFEs are a good solution to this (IMHO--YMMV).

What about Rust support?

Hi there!

I'm wondering how difficult it would be to support Rust. The Rust compiler uses LLVM and can easily emit LLVM IR. Have you been thinking about that?

I'm certainly interested in it. What would be necessary to support Rust? Probably:

  • a port of the Rust standard library (like cheerp-libcxx is for the C++ std)
  • a port of cheerp-utils into Rust
  • some modifications to your compiler
  • more?

I'd be happy to receive any information about this :)

PPA support for trusty

After adding the PPA and reloading, I see the latest version of cheerp is 1.0-1. Is there a way to get 1.2 builds for Ubuntu, or do I need to build from source?

Disable name mangling of object members?

I decided to look into how Cheerp 1.2.1 handles JS objects, so I wrote a little test program.

testobj.js:

var test =
{
    x: 1
};

test.cpp:

#include <cheerp/client.h>
#include <cheerp/clientlib.h>

namespace client
{
	class Test
	{
	public:
		int x;
	};
	extern Test test;
}

void webMain()
{
	client::console.log(client::test.x);
}

test.html:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<script src="testobj.js"></script>
		<script src="test.js"></script>
	</head>
</html>

I compiled test.cpp using clang++ -O3 -nostdlib -target cheerp test.cpp -o test.js.
When ran, the code outputted 0! Looking at test.js, I found the following code snippet (linebreaks+tabs added for readability):

function c()
{
	var d=(test.i0>>0);
	var e=String(d>>0);
	console.log(e);
	return;
}

The compiled script seems to be accessing member i0 of the test object! If I add a get() function in test.cpp and testobj.js, it runs just fine, printing 1, but it seems like an ugly workaround for some APIs that don't have accessor functions for every member. Is there a way to disable this and allow me to access object members directly instead of using a function?

Not optimized JS output

image

compile to:
image

C++ Cat constructor is empty, but in 6 line is called.
And overall output contains many unused items.
I realize this is very little overhead, but it would be nice to remove.

Comparing Cheerp startup time to Emscripten

I've tried to reproduce the startup measurements on the Cheerp 1.2 blogpost, but have not succeeded. Perhaps I do not understand what you mean specifically by "startup" - how did you define it?

I tried the following: I made a small C++ file that does almost nothing in main (like a printf). I then built that in Emscripten and Cheerp with -O3 (I also tried PreExecute on Cheerp, but it did not affect results). I measured both just parsing (in the SpiderMonkey shell) and execution in (SpiderMonkey and node.js). The numbers were similar between parsing and execution, which makes sense since in such a program almost all time is spent in parsing. Cheerp is generally faster to start up, up to 2x faster depending on the JS engine and how I measured, but not anywhere near the 10x factor I was looking for. In the browser environment, there is more noise since there is a webserver as well, but I get overall similar results, in both Firefox and Chrome.

The blogpost mentions, aside from the 10x factor, that it takes Cheerp output less than 3ms to start up on average. That by itself tells me we are probably defining "startup" differently, as that is surprisingly low for how I measured things. For example, it takes the SpiderMonkey shell 15ms for pure parsing of fannkuch compiled by Cheerp. This is on different machines, of course, but a factor of 5x is still very surprising since I'm on a decent machine, and CPU speed differences aren't that big these days. And also that's just pure parsing, not the rest of startup.

I guess we mean different things by "startup", and in my attempts I am just doing something different than you. If you can explain in detail how you got those numbers I'd be very grateful - if Emscripten has 10x slower startup in some sense, it clearly means Emscripten needs to fix something there :)

Sorry for wasting your time if I've missed something obvious here.

Issues with Boost?

I would like to use Boost in my project but it doesn't seem that cheerp would support it.
For example, I am using a header only library (boost::container::small_vector) but cheerp can't compile it.
The error message is the following:

In file included from /opt/cheerp/include/boost/container/small_vector.hpp:27:
In file included from /opt/cheerp/include/boost/container/vector.hpp:27:
In file included from /opt/cheerp/include/boost/container/allocator_traits.hpp:32:
In file included from /opt/cheerp/include/boost/container/detail/mpl.hpp:26:
/opt/cheerp/include/boost/move/detail/type_traits.hpp:955:30: error: Cheerp: Field not supported in union
   ::boost::long_long_type   long_long_;

Is there any workaround?

Cannot use IDBCursor._continue() method

IDBCursor has a continue() method, which is declared in C++ as _continue() (because continue is a C++ keyword).

However, whenever I try calling this method in C++, I get the following error when running the generated JS code:

TypeError: a._continue is not a function

It looks like the C++ to JS translation is not removing the underscore.

COMPILE ERROR: function h is not drfined

#include <cheerp/client.h>
#include <ctime>
#include <random>

using namespace std;
using namespace client;


int webMain() {
    srand((unsigned) time(NULL));
    console.log(rand());
    return 0;
}

compile to:

"use strict";
/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
var aSlot = null;
var oSlot = 0;
var nullArray = [null];
var nullObj = {d: nullArray, o: 0};
function p() {
	var a = i(nullArray, 0 >> 0);
	j(a >> 0);
	var a = k();
	var b = String(a >> 0);
	console.log(b);
	return 0 >> 0;
}
function j(d) {
	var label = 0;
	var b = (g);
	var a = (b.a14);
	if ((a === null)) {
		var a = {a0: new Uint16Array(6), i1: 0, i2: 0};
		b.a14 = a;
		a.a0[0 >> 0] = 13070;
		a.a0[1 >> 0] = 43981;
		a.a0[2 >> 0] = 4660;
		a.a0[3 >> 0] = 58989;
		a.a0[4 >> 0] = 57068;
		a.a0[5 >> 0] = 5;
		a.i1 = 11;
		a.i2 = 1;
	}
	a.i2 = (d >> 0);
	return;
}
function k() {
	var label = 0;
	var d = (g);
	var a = (d.a14);
	if ((a === null)) {
		var a = {a0: new Uint16Array(6), i1: 0, i2: 0};
		d.a14 = a;
		a.a0[0 >> 0] = 13070;
		a.a0[1 >> 0] = 43981;
		a.a0[2 >> 0] = 4660;
		a.a0[3 >> 0] = 58989;
		a.a0[4 >> 0] = 57068;
		a.a0[5 >> 0] = 5;
		a.i1 = 11;
		a.i2 = 1;
		var b = 1103527590;
	} else {
		var b = (a.i2 >> 0);
		var b = (((Math.imul(b, 1103515245) >> 0) >> 0) + (12345 >> 0) >> 0);
	}
	a.i2 = (b >> 0);
	return (b & 2147483647) >> 0;
}
function i(d, e) {
	var label = 0;
	var b = aSlot = {i0: 0, i1: 0};
	var a = h(b, null);
	if (!(((a >> 0) > -1))) {
		var a = -1;
		return a >> 0;
	}
	var a = (b.i0 >> 0);
	if ((d.length === 1 && d === nullArray && e >> 0 === 0 >> 0)) {
		return a >> 0;
	}
	d[e >> 0 >> 0] = (a >> 0);
	return a >> 0;
}
var o = {
	a0: null,
	i1: 0,
	i2: 0,
	i3: 0,
	i4: 0,
	a5: {a0: null, i1: 0},
	i6: 0,
	a7: null,
	a8: null,
	a9: null,
	a10: null,
	a11: null,
	a12: null,
	a13: {a0: null, i1: 0},
	a14: null,
	i15: 0,
	a16: new Uint8Array(4),
	a17: {a0: null, i1: 0},
	i18: 0,
	i19: 0,
	i20: 0,
	a21: {i0: 0, a1: new DataView(new ArrayBuffer(8))},
	i22: 0
};
var m = {
	a0: null,
	i1: 0,
	i2: 0,
	i3: 0,
	i4: 0,
	a5: {a0: null, i1: 0},
	i6: 0,
	a7: null,
	a8: null,
	a9: null,
	a10: null,
	a11: null,
	a12: null,
	a13: {a0: null, i1: 0},
	a14: null,
	i15: 0,
	a16: new Uint8Array(4),
	a17: {a0: null, i1: 0},
	i18: 0,
	i19: 0,
	i20: 0,
	a21: {i0: 0, a1: new DataView(new ArrayBuffer(8))},
	i22: 0
};
var n = {
	a0: null,
	i1: 0,
	i2: 0,
	i3: 0,
	i4: 0,
	a5: {a0: null, i1: 0},
	i6: 0,
	a7: null,
	a8: null,
	a9: null,
	a10: null,
	a11: null,
	a12: null,
	a13: {a0: null, i1: 0},
	a14: null,
	i15: 0,
	a16: new Uint8Array(4),
	a17: {a0: null, i1: 0},
	i18: 0,
	i19: 0,
	i20: 0,
	a21: {i0: 0, a1: new DataView(new ArrayBuffer(8))},
	i22: 0
};
var l = new Uint8Array([67, 0]);
var c = {
	i0: 0,
	a1: o,
	a2: m,
	a3: n,
	i4: 0,
	a5: null,
	i6: 0,
	i7: 0,
	a8: l[0 >> 0],
	a9: null,
	a10: null,
	i11: 0,
	i12: 0,
	a13: null,
	a14: null,
	a15: null,
	a16: null,
	a17: null,
	a18: null,
	a19: {a0: null, i1: 0, a2: createPointerArray([], 0, 32, null), a3: null},
	a20: {a0: null, i1: 0, a2: null},
	a21: null,
	a22: null,
	a23: null
};
var g = c;
function createPointerArray(ret, start, end, elem) {
	for (var __i__ = start; __i__ < end; __i__++)ret[__i__] = elem;
	return ret;
}
p();

and javascript code throw error: Uncaught ReferenceError: h is not defined

Problem using std::map

Minimal example:

#include <map>

void test() {
    std::map<int,int> theMap;
    theMap[1] = 2;
}

Compiler invocation:

/opt/cheerp/bin/clang++ -target cheerp test.cpp -o test.js

Output:

In file included from test.cpp:1:
In file included from /opt/cheerp/include/c++/v1/map:423:
In file included from /opt/cheerp/include/c++/v1/__tree:16:
/opt/cheerp/include/c++/v1/memory:1664:13: error: no matching function for call
      to 'operator new'
            ::new(__p) _Up(_VSTD::forward<_Args>(__args)...);
            ^~
/opt/cheerp/include/c++/v1/memory:1591:18: note: in instantiation of function
      template specialization
      'std::allocator<std::__tree_node<std::__value_type<int, int>, void *>
      >::construct<const int, int>' requested here
            {__a.construct(__p, _VSTD::forward<_Args>(__args)...);}
                 ^
/opt/cheerp/include/c++/v1/memory:1472:14: note: in instantiation of function
      template specialization
      'std::allocator_traits<std::allocator<std::__tree_node<std::__value_type<int,
      int>, void *> > >::__construct<const int, int>' requested here
            {__construct(__has_construct<allocator_type, pointer, _Args...>(),
             ^
/opt/cheerp/include/c++/v1/map:1328:20: note: in instantiation of function
      template specialization
      'std::allocator_traits<std::allocator<std::__tree_node<std::__value_type<int,
      int>, void *> > >::construct<const int, int>' requested here
    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__cc.f...
                   ^
/opt/cheerp/include/c++/v1/map:1396:29: note: in instantiation of member
      function 'std::map<int, int, std::less<int>,
      std::allocator<std::pair<const int, int> > >::__construct_node_with_key'
      requested here
        __node_holder __h = __construct_node_with_key(_VSTD::move(__k));
                            ^
test.cpp:10:11: note: in instantiation of member function 'std::map<int, int,
      std::less<int>, std::allocator<std::pair<const int, int> > >::operator[]'
      requested here
    theMap[1] = 2;
          ^
/opt/cheerp/include/c++/v1/new:145:40: note: candidate function not viable: no
      known conversion from 'const int *' to 'void *' for 2nd argument; take the
      address of the argument with &
inline _LIBCPP_INLINE_VISIBILITY void* operator new  (std::size_t, void...
                                       ^
/opt/cheerp/include/c++/v1/new:132:30: note: candidate function not viable: no
      known conversion from 'const int *' to 'const std::nothrow_t' for 2nd
      argument
_LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz, const std::n...
                             ^
/opt/cheerp/include/c++/v1/new:127:30: note: candidate function not viable:
      requires single argument '__sz', but 2 arguments were provided
_LIBCPP_NEW_DELETE_VIS void* operator new(std::size_t __sz)
                             ^
1 error generated.

/opt/cheerp/bin/clang-3.7 segfaults during compilation of libsodium-cmake

I'm trying to compile libsodium-cmake (https://github.com/ctrix/libsodium-cmake) with cheerp, but clang crashes with segmentation fault 11:

Building C object src/libsodium/CMakeFiles/libsodium.dir/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c.obj
clang-3.7: warning: argument unused during compilation: '-fno-strict-overflow'
0 clang-3.7 0x00000001008a7959 llvm::sys::PrintStackTrace(sFILE) + 57
1 clang-3.7 0x00000001008a80bb SignalHandler(int) + 395
2 libsystem_platform.dylib 0x00007fff9344052a sigtramp + 26
3 clang-3.7 0x00000001005a37b5 llvm::ICmpInst::makeConstantRange(llvm::CmpInst::Predicate, llvm::APInt const&) + 309
4 clang-3.7 0x00000001002ccd79 llvm::SimplifyGEPInst(llvm::ArrayRefllvm::Value_, llvm::DataLayout const
, llvm::TargetLibraryInfo const
, llvm::DominatorTree const_, llvm::AssumptionCache_, llvm::Instruction const_) + 105
5 clang-3.7 0x00000001002ce64b llvm::SimplifyInstruction(llvm::Instruction_, llvm::DataLayout const_, llvm::TargetLibraryInfo const_, llvm::DominatorTree const_, llvm::AssumptionCache_) + 2203
6 clang-3.7 0x0000000100789148 (anonymous namespace)::EarlyCSE::runOnFunction(llvm::Function&) + 3912
7 clang-3.7 0x00000001005b1736 llvm::FPPassManager::runOnFunction(llvm::Function&) + 294
8 clang-3.7 0x00000001005b118d llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 189
9 clang-3.7 0x0000000100ccd604 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module_, clang::BackendAction, llvm::raw_ostream_) + 6836
10 clang-3.7 0x0000000100ddac32 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 498
11 clang-3.7 0x000000010116ad24 clang::ParseAST(clang::Sema&, bool, bool) + 468
12 clang-3.7 0x0000000100aa6fee clang::FrontendAction::Execute() + 62
13 clang-3.7 0x0000000100a78d63 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 883
14 clang-3.7 0x0000000100ae02dd clang::ExecuteCompilerInvocation(clang::CompilerInstance_) + 3645
15 clang-3.7 0x000000010000934a cc1_main(llvm::ArrayRef, char const_, void_) + 826
16 clang-3.7 0x0000000100006050 main + 1520
17 clang-3.7 0x00000001000059e4 start + 52
Stack dump:
0. Program arguments: /opt/cheerp/bin/clang-3.7 -cc1 -triple cheerp--webbrowser -emit-llvm-bc -disable-free -disable-llvm-verifier -main-file-name hmac_hmacsha256.c -mrelocation-model static -mthread-model posix -relaxed-aliasing -fmath-errno -no-integrated-as -mconstructor-aliases -target-linker-version 136 -dwarf-column-info -coverage-file /Users/GLippold/development/libsodium-cmake/build/src/libsodium/CMakeFiles/libsodium.dir/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c.obj -resource-dir /opt/cheerp/bin/../lib/clang/3.7.0 -D _FORTIFY_SOURCE=2 -I /Users/GLippold/development/libsodium-cmake/src/libsodium/include -I /Users/GLippold/development/libsodium-cmake/src/libsodium/include/sodium -I /Users/GLippold/development/libsodium-cmake/build/src/libsodium/include/sodium -internal-isystem /opt/cheerp/bin/../lib/clang/3.7.0/include -internal-externc-isystem /opt/cheerp/include -internal-externc-isystem /opt/cheerp/include/client -O3 -Wall -Wdiv-by-zero -Wextra -Winit-self -Wsometimes-uninitialized -Wstrict-prototypes -Wunused -Wwrite-strings -std=c99 -fconst-strings -fno-dwarf-directory-asm -fdebug-compilation-dir /Users/GLippold/development/libsodium-cmake/build/src/libsodium -ferror-limit 19 -fmessage-length 110 -fvisibility hidden -fwrapv -stack-protector 3 -mstackrealign -fno-rtti -fno-threadsafe-statics -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o CMakeFiles/libsodium.dir/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c.obj -x c /Users/GLippold/development/libsodium-cmake/src/libsodium/crypto_auth/hmacsha256/ref/hmac_hmacsha256.c

  1. parser at end of file
  2. Per-function optimization
  3. Running pass 'Early CSE' on function '@crypto_auth_hmacsha256'
    clang-3.7: error: unable to execute command: Segmentation fault: 11

Steps to reproduce:
0. Install cheerp-macosx-1.2.1 on OS X 10.11.4

  1. checkout libsodium-cmake with git:

$ git clone https://github.com/ctrix/libsodium-cmake.git

  1. create build folder in checked-out source and cd into it

$ cd libsodium-cmake
$ mkdir build
$ cd build

  1. start cheerp compilation as per instructions

$ cmake -DCMAKE_TOOLCHAIN_FILE=/opt/cheerp/share/cmake/Modules/CheerpToolchain.cmake ..

  1. start compilation

$ make

  1. clang-3.7 crashes with above segfault.

The clang error message asked to submit the files hmac_hmacsha256-e4e734.{c,sh} with the bug report. I zipped them up and attached them to this bug report as hmac_hmacsha256-e4e734.zip.

Thanks!

Basic

Hello

it s not really an issue, but would you provide a sample with basic shader loading using your api?
Kind regards
dav

String + String compile error

#include <cheerp/client.h>
using namespace client;

int webMain() {

    String hello("Hello");
    String name("World");
    String text(hello + name);
    alert(text);

    return 0;
}

compile to:

"use strict";
/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
var aSlot = null;
var oSlot = 0;
var nullArray = [null];
var nullObj = {d: nullArray, o: 0};
function p() {
	var a = "Hello";
	var c = "World";
	var d = +a.valueOf();
	var b = +c.valueOf();
	var a = String((d + b));
	alert(a);
	return 0 >> 0;
}
function g(d, e) {
	var label = 0;
	var a = String();
	var b = (d[e >> 0 >> 0] & 255);
	if (!(((b & 255) === 0))) {
		var c = 0;
		while (1) {
			var q = String.fromCharCode(((b << 24) >> 24) >> 0);
			var a = a.concat(q);
			var c = ((c >> 0) + (1 >> 0) >> 0);
			var b = (d[(e >> 0) + (c >> 0) >> 0] & 255);
			if (((b & 255) === 0)) {
				break;
			}
		}
	}
	return String(a);
}
var h = new Uint8Array([72, 101, 108, 108, 111, 0]);
var i = new Uint8Array([87, 111, 114, 108, 100, 0]);
p();

Google closure compiler compile to:

alert(String(+"Hello".valueOf()+ +"World".valueOf()));

BUT must be:

alert("Hello"+"World");

Working with files

I want to convert a C program that takes a file as argument, process it, and generates another file as output, plus it generates some stderr messages in case of error.

It should run in the browser.

Some questions:

  • How to input the file contents to the program?
  • How to detect the end of the execution?
  • How to capture the stderr messages?
  • How to capture the file output contents?

The wiki says there is a way to plug events and such, but I couldn't find more information about it.

Thank you

error: non-static member 'set_' found in multiple base-class subobjects of type 'client::Object':

#include <cheerp/client.h>

using namespace cheerp;
using namespace client;


int webMain() {
    window.set_("ololo", new String("trololo"));
    return 0;
}

console output:

main.cpp:20:12: error: non-static member 'set_' found in multiple base-class subobjects of type 'client::Object':
    class client::Window -> class client::EventTarget -> class client::Object
    class client::Window -> class client::MSEventAttachmentTarget -> class client::Object
    class client::Window -> class client::WindowLocalStorage -> class client::Object
    class client::Window -> class client::MSWindowExtensions -> class client::Object
    class client::Window -> class client::WindowSessionStorage -> class client::Object
    class client::Window -> class client::WindowTimers -> class client::Object
    window.set_("ololo", new String("trololo"));
           ^
c:/cheerp/include/client\cheerp/jsobject.h:46:7: note: member found by ambiguous name lookup
        void set_(const client::String& name, Object* v);
             ^
1 error generated.

Process finished with exit code 1

Add built-in "Google closure-compiler" in Advanced mode support

Now, this code:

#include <cheerp/client.h>
using namespace client;

int webMain() {
    alert("111 + 333");
    return 0;
}

With -O3 flag compile to this:

"use strict";
/*Compiled using Cheerp (R) by Leaning Technologies Ltd*/
var aSlot = null;
var oSlot = 0;
var nullArray = [null];
var nullObj = {d: nullArray, o: 0};
function k() {
	var a = "111 + 333";
	alert(a);
	return 0 >> 0;
}
function j(m, n) {
	var label = 0;
	var a = String();
	var b = (m[n >> 0 >> 0] & 255);
	if (!(((b & 255) === 0))) {
		var c = 0;
		while (1) {
			var l = String.fromCharCode(((b << 24) >> 24) >> 0);
			var a = a.concat(l);
			var c = ((c >> 0) + (1 >> 0) >> 0);
			var b = (m[(n >> 0) + (c >> 0) >> 0] & 255);
			if (((b & 255) === 0)) {
				break;
			}
		}
	}
	return String(a);
}
var d = new Uint8Array([49, 49, 49, 32, 43, 32, 51, 51, 51, 0]);
k();

But Google closure compiler in anvansed mode minify this code to this:

image

I can not just translate code with "closure compiler" manually.
Since advanced mode requires writing code in a special way.
And it is the task of the Cheerp.

Access constants like Node.TEXT_NODE without an instance

In JS, you don't need to have an instance of Node to access a constant like Node.TEXT_NODE.

However, in the C++ bindings, Node::get_TEXT_NODE() is a non-static method, which means I do need an instance of Node to access it. I believe methods like this should be static methods instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.