Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecf61372 authored by Bryan Tong Minh's avatar Bryan Tong Minh Committed by Luca Stefani
Browse files

Add detection for WSL

Change-Id: I8d57cd653157bb9b51019b3cc1192c8210e990e2
parent 14925d03
Loading
Loading
Loading
Loading
+18 −0
Original line number Original line Diff line number Diff line
#
# Copyright (C) 2018 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Configuration for builds hosted on wsl-x86_64.
# Included by combo/HOST_linux-x86_64.mk
 No newline at end of file
+5 −0
Original line number Original line Diff line number Diff line
@@ -20,3 +20,8 @@
define $(combo_var_prefix)transform-shared-lib-to-toc
define $(combo_var_prefix)transform-shared-lib-to-toc
$(call _gen_toc_command_for_elf,$(1),$(2))
$(call _gen_toc_command_for_elf,$(1),$(2))
endef
endef

# Microsoft Windows Subsystem for Linux
ifeq ($(HOST_OS_IS_WSL),true)
include $(BUILD_COMBOS)/HOST_EXTRA_wsl-x86_64.mk
endif
 No newline at end of file
+6 −0
Original line number Original line Diff line number Diff line
@@ -102,6 +102,12 @@ UNAME := $(shell uname -sm)
# HOST_OS
# HOST_OS
ifneq (,$(findstring Linux,$(UNAME)))
ifneq (,$(findstring Linux,$(UNAME)))
  HOST_OS := linux
  HOST_OS := linux
    ifneq (,$(findstring Microsoft,$(shell uname -r)))
      # Microsoft Windows Subsystem for Linux
      # The HOST_OS is still Linux but with some limitations.
      # Assumes that there are no other Microsoft Linux kernels
      HOST_OS_IS_WSL := true
    endif
endif
endif
ifneq (,$(findstring Darwin,$(UNAME)))
ifneq (,$(findstring Darwin,$(UNAME)))
  HOST_OS := darwin
  HOST_OS := darwin