Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Pass runtime headers via '-I' flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sbogolepov committed Aug 13, 2018
1 parent 84d1b5a commit fb6e410
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 17 deletions.
4 changes: 3 additions & 1 deletion libclangext/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ model {
}
}
binaries.withType(StaticLibraryBinarySpec) { binary ->
cppCompiler.args "--std=c++11", "-g", "-fPIC", "-I${llvmDir}/include"
if (!project.parent.convention.plugins.platformInfo.isWindows())
cppCompiler.args "-fPIC"
cppCompiler.args "--std=c++11", "-g", "-I${llvmDir}/include"
if (isEnabled) {
cppCompiler.args '-DLIBCLANGEXT_ENABLE=1'
}
Expand Down
1 change: 1 addition & 0 deletions runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ targetList.each { targetName ->
if (!isWindows())
compilerArgs '-fPIC'
compilerArgs '-I' + project.file('../common/src/hash/headers')
compilerArgs '-I' + file('src/main/cpp')
if (rootProject.hasProperty("${targetName}LibffiDir"))
compilerArgs '-I' + project.file(rootProject.ext.get("${targetName}LibffiDir") + "/include")
linkerArgs project.file("../common/build/$targetName/hash.bc").path
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Arrays.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <stdio.h>
#include <string.h>

#include "Assert.h"
#include "KAssert.h"
#include "Exceptions.h"
#include "Memory.h"
#include "Natives.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "Assert.h"
#include "KAssert.h"
#include "Memory.h"
#include "Natives.h"
#include "KString.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#endif
#endif // OMIT_BACKTRACE

#include "Assert.h"
#include "KAssert.h"
#include "Exceptions.h"
#include "ExecFormat.h"
#include "Memory.h"
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/main/cpp/ExecFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include <vector>

#include "Assert.h"
#include "KAssert.h"

namespace {

Expand Down Expand Up @@ -148,7 +148,7 @@ extern "C" bool AddressToSymbol(const void* address, char* resultBuffer, size_t
#include <stdlib.h>
#include <string.h>

#include "Assert.h"
#include "KAssert.h"

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

#include "KAssert.h"
#include "Porting.h"

void RuntimeAssertFailed(const char* location, const char* message) {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/KDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <string.h>

#include "Assert.h"
#include "KAssert.h"
#include "Memory.h"
#include "Natives.h"
#include "Porting.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/KString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#include <string.h>

#include "Assert.h"
#include "KAssert.h"
#include "City.h"
#include "Exceptions.h"
#include "Memory.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <cstddef> // for offsetof

#include "Alloc.h"
#include "Assert.h"
#include "KAssert.h"
#include "Atomic.h"
#include "Exceptions.h"
#include "Memory.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#ifndef RUNTIME_MEMORY_H
#define RUNTIME_MEMORY_H

#include "Assert.h"
#include "KAssert.h"
#include "Common.h"
#include "TypeInfo.h"

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <stdio.h>
#include <string.h>

#include "Assert.h"
#include "KAssert.h"
#include "Exceptions.h"
#include "Memory.h"
#include "Natives.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/ObjCInterop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Class Kotlin_objc_lookUpClass(const char* name) {

#else // KONAN_OBJC_INTEROP

#include "Assert.h"
#include "KAssert.h"

extern "C" {

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/StdCppStubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "Assert.h"
#include "KAssert.h"
#include "Porting.h"
#include "Common.h"

Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/ToString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <stdio.h>
#include <string.h>

#include "Assert.h"
#include "KAssert.h"
#include "Exceptions.h"
#include "Memory.h"
#include "Natives.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/TypeInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "Assert.h"
#include "KAssert.h"
#include "TypeInfo.h"

// If one shall use binary search when looking up methods and fields.
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#include <cstdint>
#include "Assert.h"
#include "KAssert.h"

class SimpleMutex {
private:
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/main/cpp/Worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#endif

#include "Alloc.h"
#include "Assert.h"
#include "KAssert.h"
#include "Memory.h"
#include "Runtime.h"
#include "Types.h"
Expand Down

0 comments on commit fb6e410

Please sign in to comment.