Permalink
Browse files

Add detection for WSL

Change-Id: I8d57cd653157bb9b51019b3cc1192c8210e990e2
  • Loading branch information...
btongminh authored and luca020400 committed Jan 14, 2017
1 parent 14925d0 commit ecf613729a0b5f9899182b19fe614abe38f7d18e
Showing with 29 additions and 0 deletions.
  1. +18 −0 core/combo/HOST_EXTRA_wsl-x86_64.mk
  2. +5 −0 core/combo/HOST_linux-x86_64.mk
  3. +6 −0 core/envsetup.mk
@@ -0,0 +1,18 @@
#
# 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
@@ -20,3 +20,8 @@
define $(combo_var_prefix)transform-shared-lib-to-toc
$(call _gen_toc_command_for_elf,$(1),$(2))
endef
# Microsoft Windows Subsystem for Linux
ifeq ($(HOST_OS_IS_WSL),true)
include $(BUILD_COMBOS)/HOST_EXTRA_wsl-x86_64.mk
endif
@@ -102,6 +102,12 @@ UNAME := $(shell uname -sm)
# HOST_OS
ifneq (,$(findstring Linux,$(UNAME)))
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
ifneq (,$(findstring Darwin,$(UNAME)))
HOST_OS := darwin

0 comments on commit ecf6137

Please sign in to comment.