aboutsummaryrefslogtreecommitdiff
path: root/engine.mk
diff options
context:
space:
mode:
authorperl <perl@immunant.com>2021-09-20 19:42:36 -0700
committerPer Larsen <perl@immunant.com>2021-10-14 18:55:15 +0000
commit474691472a29c2effe3b9cf2417a52412a283c0d (patch)
tree1d1c6e296440c514f9996b281e7a54c639bb9f1c /engine.mk
parentc27bc8b37346b5240a81cfc965c1614ca0398131 (diff)
downloadcommon-474691472a29c2effe3b9cf2417a52412a283c0d.tar.gz
[kernel] Build hermetically
Allow the trusty kernel to be built on a host that does not have a compiler toolchain installed. Test: build.py generic-arm64 Bug: 199946160 Change-Id: I5792acb5dd6634fefa5e488efec01b4f98fe2ae4
Diffstat (limited to 'engine.mk')
-rw-r--r--engine.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/engine.mk b/engine.mk
index ade84c52..1ce828c3 100644
--- a/engine.mk
+++ b/engine.mk
@@ -65,6 +65,8 @@ OUTBIN := $(BUILDDIR)/lk.bin
OUTELF := $(BUILDDIR)/lk.elf
CONFIGHEADER := $(BUILDDIR)/config.h
+# Eliminate /usr/local/include and /usr/include to build kernel hermetically
+GLOBAL_KERNEL_COMPILEFLAGS += --sysroot=fake_sysroot
GLOBAL_KERNEL_INCLUDES := $(addsuffix /include,$(LKINC))
# For backwards compatibility.
GLOBAL_KERNEL_INCLUDES += $(addsuffix /include/uapi/uapi,$(LKINC)) $(addsuffix /include/shared/lk,$(LKINC))