Skip to content

Commit

Permalink
move has_flags.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jan 24, 2025
1 parent d1b1492 commit 35677f5
Show file tree
Hide file tree
Showing 99 changed files with 596 additions and 596 deletions.
Binary file added tests/apis/custom_toolchain/3
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end

-- attempt to check it from the argument list
function _check_from_arglist(flags, opt, islinker)
local key = "detect.tools.cl6x." .. (islinker and "has_ldflags" or "has_cflags")
local key = "core.tools.cl6x." .. (islinker and "has_ldflags" or "has_cflags")
local flagskey = opt.program .. "_" .. (opt.programver or "")
local allflags = detectcache:get2(key, flagskey)
if not allflags then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function _check_from_arglist(flags, opt)
end

-- make cache key
local key = "detect.tools.ar.has_flags"
local key = "core.tools.ar.has_flags"

-- make allflags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
23 changes: 23 additions & 0 deletions xmake/modules/core/tools/armasm64_msvc/has_flags.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file has_flags.lua
--

-- imports
inherit("core.tools.armasm_msvc.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function _check_from_arglist(flags, opt)
end

-- make cache key
local key = "detect.tools.armasm.has_flags"
local key = "core.tools.armasm.has_flags"

-- make allflags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ end

-- attempt to check it from the argument list
function _check_from_arglist(flags, opt, islinker)
local key = "detect.tools.armclang." .. (islinker and "has_ldflags" or "has_cflags")
local key = "core.tools.armclang." .. (islinker and "has_ldflags" or "has_cflags")
local flagskey = opt.program .. "_" .. (opt.programver or "")
local allflags = detectcache:get2(key, flagskey)
if not allflags then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.cl.has_flags")
inherit("core.tools.gcc.has_flags")

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ end

-- attempt to check it from the argument list
function _check_from_arglist(flags, opt)
local key = "detect.tools.cl.has_flags"
local key = "core.tools.cl.has_flags"
local flagskey = opt.program .. "_" .. (opt.programver or "")
local allflags = global_detectcache:get2(key, flagskey)
if not allflags then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.ml.has_flags")
inherit("core.tools.cl6x.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ end

-- attempt to check it from the argument list
function _check_from_arglist(flags, opt, islinker)
local key = "detect.tools.cl6x." .. (islinker and "has_ldflags" or "has_cflags")
local key = "core.tools.cl6x." .. (islinker and "has_ldflags" or "has_cflags")
local flagskey = opt.program .. "_" .. (opt.programver or "")
local allflags = detectcache:get2(key, flagskey)
if not allflags then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
--

-- imports
import("detect.tools.gcc.cfeatures")
import("core.tools.gcc.cfeatures")

-- set features
function _set(feature, condition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
--

-- imports
import("detect.tools.gcc.cxxfeatures")
import("core.tools.gcc.cxxfeatures")

-- set features
function _set(feature, condition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
--

-- imports
inherit("detect.tools.gcc.features")
inherit("core.tools.gcc.features")
import("cfeatures")
import("cxxfeatures")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.gcc.has_flags")
inherit("core.tools.gcc.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function _check_from_arglist(flags, opt)
end

-- make cache key
local key = "detect.tools.clang_cl.has_flags"
local key = "core.tools.clang_cl.has_flags"

-- make allflags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.gcc.features")
inherit("core.tools.gcc.features")

Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.gcc.has_flags")
inherit("core.tools.gcc.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end

-- attempt to check it from the argument list
function _check_from_arglist(flags, opt, islinker)
local key = "detect.tools.cosmocc." .. (islinker and "has_ldflags" or "has_cflags")
local key = "core.tools.cosmocc." .. (islinker and "has_ldflags" or "has_cflags")
local flagskey = opt.program .. "_" .. (opt.programver or "")
local allflags = detectcache:get2(key, flagskey)
if not allflags then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.cl6x.has_flags")
inherit("core.tools.cosmocc.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function _check_from_arglist(flags, opt, islinker)
end

-- make cache key
local key = "detect.tools.dmd.has_flags"
local key = "core.tools.dmd.has_flags"

-- make allflags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
--

-- imports
import("detect.tools.clang.cfeatures")
import("core.tools.clang.cfeatures")
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
--

-- imports
import("detect.tools.clang.cxxfeatures")
import("core.tools.clang.cxxfeatures")
22 changes: 22 additions & 0 deletions xmake/modules/core/tools/dpcpp/features.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file features.lua
--

-- imports
inherit("core.tools.clang.features")
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.gcc.has_flags")
inherit("core.tools.clang.has_flags")

23 changes: 23 additions & 0 deletions xmake/modules/core/tools/emcc/has_flags.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file has_flags.lua
--

-- imports
inherit("core.tools.gcc.has_flags")

23 changes: 23 additions & 0 deletions xmake/modules/core/tools/emxx/has_flags.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file has_flags.lua
--

-- imports
inherit("core.tools.emcc.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function _check_from_arglist(flags, opt)
end

-- make cache key
local key = "detect.tools.fpc.has_flags"
local key = "core.tools.fpc.has_flags"

-- make allflags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ end

-- attempt to check it from the argument list
function _check_from_arglist(flags, opt, islinker)
local key = "detect.tools.gcc." .. (islinker and "has_ldflags" or "has_cflags")
local key = "core.tools.gcc." .. (islinker and "has_ldflags" or "has_cflags")
local flagskey = opt.program .. "_" .. (opt.programver or "")
local allflags = detectcache:get2(key, flagskey)
if not allflags then
Expand Down
23 changes: 23 additions & 0 deletions xmake/modules/core/tools/gccgo/has_flags.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file has_flags.lua
--

-- imports
inherit("core.tools.gcc.has_flags")

Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function _check_from_arglist(flags, opt, islinker)
end

-- make cache key
local key = "detect.tools.gdc.has_flags"
local key = "core.tools.gdc.has_flags"

-- make flags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function _check_from_arglist(flags, opt, islinker)
end

-- make cache key
local key = "detect.tools.gfortran.has_flags"
local key = "core.tools.gfortran.has_flags"

-- make flags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function _check_from_arglist(flags, opt, islinker)
end

-- make cache key
local key = "detect.tools.go.has_flags"
local key = "core.tools.go.has_flags"

-- make flags key
local flagskey = opt.program .. "_" .. (opt.programver or "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
--

-- imports
inherit("detect.tools.gcc.features")
inherit("core.tools.gcc.features")

23 changes: 23 additions & 0 deletions xmake/modules/core/tools/gxx/has_flags.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file has_flags.lua
--

-- imports
inherit("core.tools.gcc.has_flags")

23 changes: 23 additions & 0 deletions xmake/modules/core/tools/icc/has_flags.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--!A cross-platform build utility based on Lua
--
-- 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.
--
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
-- @file has_flags.lua
--

-- imports
inherit("core.tools.gcc.has_flags")

Loading

0 comments on commit 35677f5

Please sign in to comment.