summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-09-30 00:50:13 +0800
committerruki <[email protected]>2022-09-30 00:50:13 +0800
commiteef4865d1df048921dd06541dd9038f457af9e90 (patch)
treeb78127597394c9abe702e6464495d63482b17aee
parentd071069b3ea4ec22a51620287c921f0983d17eef (diff)
improve target:clone
-rw-r--r--xmake/core/project/target.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 1c6914743..22ddd267c 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -298,7 +298,7 @@ end
-- clone target, @note we can just call it in after_load()
function _instance:clone()
- if not self:_is_loaded() or self._LOADED_AFTER then
+ if not self:_is_loaded() then
os.raise("please call target:clone() in after_load().", self:name())
end
local instance = target.new(self:name(), self._INFO:clone())