Skip to content

Commit 7684079

Browse files
Merge pull request #460 from SylvainCorlay/cling-0.9
Upgrade to cling 0.9
2 parents 2abc8dd + 475f9cf commit 7684079

File tree

5 files changed

+6
-13
lines changed

5 files changed

+6
-13
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install:
2727
- conda update -q conda
2828
- conda info -a
2929
# Install dependencies
30-
- 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
30+
- 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
3131
# Build and install xeus-cling
3232
- mkdir build
3333
- cd build

.azure-pipelines/unix-build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ steps:
4646
- script: |
4747
source activate xeus-cling
4848
conda remove libcxx --force # Workaround for https://github.com/conda-forge/clangdev-feedstock/issues/188 impacting conda package for clangdev 5
49-
export SDKROOT=`xcrun --sdk macosx --show-sdk-path`
50-
echo "SDKROOT = $SDKROOT"
5149
py.test . -v;
5250
condition: eq('${{ parameters.platform }}', 'OSX')
5351
displayName: Test xeus-cling (Python)

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ if(MSVC)
270270
??1raw_string_ostream@llvm@@UEAA@XZ
271271
?flush_nonempty@raw_ostream@llvm@@AEAAXXZ
272272
?getASTContext@Decl@clang@@QEBAAEAVASTContext@2@XZ
273-
?handle@raw_ostream@llvm@@EEAAXXZ
274273
?preferred_buffer_size@raw_ostream@llvm@@MEBA_KXZ
275274
?write_impl@raw_string_ostream@llvm@@EEAAXPEBD_K@Z
276275
?castToDeclContext@Decl@clang@@SAPEAVDeclContext@2@PEBV12@@Z

environment-host.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ dependencies:
66
- cmake
77
# Host dependencies
88
- xeus-zmq=1.0.0
9-
- cling=0.8
10-
- clangdev=5
11-
- llvmdev=5
9+
- cling=0.9
1210
- nlohmann_json
1311
- cppzmq
1412
- xtl=0.7

src/xmagics/executable.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ namespace xcpp
131131

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

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

189189
// Construct arguments to linker command.
190-
llvm::SmallVector<const char*, 16> Args;
190+
llvm::SmallVector<llvm::StringRef, 16> Args;
191191
Args.push_back(Compiler.c_str());
192192
Args.push_back(ObjectFile.c_str());
193193
for (auto& O : LinkerOptions)
@@ -196,7 +196,6 @@ namespace xcpp
196196
}
197197
Args.push_back("-o");
198198
Args.push_back(ExeFile.c_str());
199-
Args.push_back(NULL);
200199

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

208207
llvm::StringRef OutputFileStr(OutputFile);
209208
llvm::StringRef ErrorFileStr(ErrorFile);
210-
const llvm::StringRef* Redirects[] = {nullptr, &OutputFileStr,
211-
&ErrorFileStr};
209+
llvm::SmallVector<llvm::Optional<llvm::StringRef>, 16> Redirects = {llvm::NoneType::None, OutputFileStr, ErrorFileStr};
212210

213211
// Finally run the linker.
214-
int ret = llvm::sys::ExecuteAndWait(Compiler, Args.data(), nullptr,
212+
int ret = llvm::sys::ExecuteAndWait(Compiler, Args, llvm::NoneType::None,
215213
Redirects);
216214

217215
// Read back output and error streams.

0 commit comments

Comments
 (0)