mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
Toolchain/Clang: Pick up includes when running inside Serenity
The toolchain should work without setting `--sysroot` when we build inside SerenityOS.
This commit is contained in:
parent
91546f42f3
commit
ea8335cda1
Notes:
sideshowbarker
2024-07-18 00:35:18 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/ea8335cda14 Pull-request: https://github.com/SerenityOS/serenity/pull/10996 Reviewed-by: https://github.com/timschumi ✅
1 changed files with 4 additions and 5 deletions
|
@ -136,10 +136,10 @@ index 58ae08a38..8e9a3fee6 100644
|
|||
options::OPT_foperator_names, false))
|
||||
diff --git a/clang/lib/Driver/ToolChains/Serenity.cpp b/clang/lib/Driver/ToolChains/Serenity.cpp
|
||||
new file mode 100644
|
||||
index 000000000..512eafd72
|
||||
index 000000000..b21be0f9d
|
||||
--- /dev/null
|
||||
+++ b/clang/lib/Driver/ToolChains/Serenity.cpp
|
||||
@@ -0,0 +1,281 @@
|
||||
@@ -0,0 +1,280 @@
|
||||
+//===---- Serenity.cpp - SerenityOS ToolChain Implementation ----*- C++ -*-===//
|
||||
+//
|
||||
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
|
@ -345,9 +345,8 @@ index 000000000..512eafd72
|
|||
+ if (DriverArgs.hasArg(options::OPT_nostdlibinc))
|
||||
+ return;
|
||||
+
|
||||
+ if (!D.SysRoot.empty()) {
|
||||
+ addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include");
|
||||
+ addExternCSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
|
||||
+ addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/local/include");
|
||||
+ addSystemInclude(DriverArgs, CC1Args, D.SysRoot + "/usr/include");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
|
|
Loading…
Reference in a new issue