Skip to content

Commit

Permalink
Merge pull request #460 from SylvainCorlay/cling-0.9
Browse files Browse the repository at this point in the history
Upgrade to cling 0.9
  • Loading branch information
SylvainCorlay authored Oct 30, 2022
2 parents 2abc8dd + 475f9cf commit 7684079
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install:
- conda update -q conda
- conda info -a
# Install dependencies
- conda install cmake dirent xeus-zmq=1.0.0 cling=0.8 clangdev=5 llvmdev=5 nlohmann_json cppzmq xtl=0.7 pugixml cxxopts=2.1.2 doctest>=2.4.6 -c conda-forge
- conda install cmake dirent xeus-zmq=1.0.0 cling=0.9 nlohmann_json cppzmq xtl=0.7 pugixml cxxopts=2.1.2 doctest>=2.4.6 zlib -c conda-forge
# Build and install xeus-cling
- mkdir build
- cd build
Expand Down
2 changes: 0 additions & 2 deletions .azure-pipelines/unix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ steps:
- script: |
source activate xeus-cling
conda remove libcxx --force # Workaround for https://github.com/conda-forge/clangdev-feedstock/issues/188 impacting conda package for clangdev 5
export SDKROOT=`xcrun --sdk macosx --show-sdk-path`
echo "SDKROOT = $SDKROOT"
py.test . -v;
condition: eq('${{ parameters.platform }}', 'OSX')
displayName: Test xeus-cling (Python)
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ if(MSVC)
??1raw_string_ostream@llvm@@UEAA@XZ
?flush_nonempty@raw_ostream@llvm@@AEAAXXZ
?getASTContext@Decl@clang@@QEBAAEAVASTContext@2@XZ
?handle@raw_ostream@llvm@@EEAAXXZ
?preferred_buffer_size@raw_ostream@llvm@@MEBA_KXZ
?write_impl@raw_string_ostream@llvm@@EEAAXPEBD_K@Z
?castToDeclContext@Decl@clang@@SAPEAVDeclContext@2@PEBV12@@Z
Expand Down
4 changes: 1 addition & 3 deletions environment-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ dependencies:
- cmake
# Host dependencies
- xeus-zmq=1.0.0
- cling=0.8
- clangdev=5
- llvmdev=5
- cling=0.9
- nlohmann_json
- cppzmq
- xtl=0.7
Expand Down
10 changes: 4 additions & 6 deletions src/xmagics/executable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace xcpp

// Generate relocations suitable for dynamic linking.
auto CodeGenOpts = CI->getCodeGenOpts();
CodeGenOpts.RelocationModel = "pic";
CodeGenOpts.RelocationModel = llvm::Reloc::Model::PIC_;

// Enable debug information if requested.
if (EnableDebugInfo)
Expand Down Expand Up @@ -187,7 +187,7 @@ namespace xcpp
llvm::sys::path::append(Compiler, "bin", "clang++");

// Construct arguments to linker command.
llvm::SmallVector<const char*, 16> Args;
llvm::SmallVector<llvm::StringRef, 16> Args;
Args.push_back(Compiler.c_str());
Args.push_back(ObjectFile.c_str());
for (auto& O : LinkerOptions)
Expand All @@ -196,7 +196,6 @@ namespace xcpp
}
Args.push_back("-o");
Args.push_back(ExeFile.c_str());
Args.push_back(NULL);

// Redirect output and error streams from linker.
llvm::SmallString<64> OutputFile, ErrorFile;
Expand All @@ -207,11 +206,10 @@ namespace xcpp

llvm::StringRef OutputFileStr(OutputFile);
llvm::StringRef ErrorFileStr(ErrorFile);
const llvm::StringRef* Redirects[] = {nullptr, &OutputFileStr,
&ErrorFileStr};
llvm::SmallVector<llvm::Optional<llvm::StringRef>, 16> Redirects = {llvm::NoneType::None, OutputFileStr, ErrorFileStr};

// Finally run the linker.
int ret = llvm::sys::ExecuteAndWait(Compiler, Args.data(), nullptr,
int ret = llvm::sys::ExecuteAndWait(Compiler, Args, llvm::NoneType::None,
Redirects);

// Read back output and error streams.
Expand Down

0 comments on commit 7684079

Please sign in to comment.