mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-11-04 03:29:55 +00:00 
			
		
		
		
	Revert: "Makefile: Fix rust agent build using "--release"."
This reverts commit a3e46a369f.
There is still problem with static link, built binary will
segmentfault on clearlinux. So revert this patch for now.
Depends-on: github.com/kata-containers/tests#2293
Fixes: #69
Signed-off-by: Yang Bo <bo@hyper.sh>
			
			
This commit is contained in:
		@@ -23,12 +23,11 @@ COMMIT_MSG = $(if $(COMMIT),$(COMMIT),unknown)
 | 
				
			|||||||
# Exported to allow cargo to see it
 | 
					# Exported to allow cargo to see it
 | 
				
			||||||
export VERSION_COMMIT := $(if $(COMMIT),$(VERSION)-$(COMMIT),$(VERSION))
 | 
					export VERSION_COMMIT := $(if $(COMMIT),$(VERSION)-$(COMMIT),$(VERSION))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BUILD_TYPE = release
 | 
					BUILD_TYPE = debug
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ARCH = $(shell uname -m)
 | 
					ARCH = $(shell uname -m)
 | 
				
			||||||
LIBC = musl
 | 
					LIBC = musl
 | 
				
			||||||
TRIPLE = $(ARCH)-unknown-linux-$(LIBC)
 | 
					TRIPLE = $(ARCH)-unknown-linux-$(LIBC)
 | 
				
			||||||
RUSTFLAGS = -C linker=musl-gcc
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET)
 | 
					TARGET_PATH = target/$(TRIPLE)/$(BUILD_TYPE)/$(TARGET)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -53,7 +52,7 @@ default: $(TARGET) show-header
 | 
				
			|||||||
$(TARGET): $(TARGET_PATH)
 | 
					$(TARGET): $(TARGET_PATH)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(TARGET_PATH): $(SOURCES) | show-summary
 | 
					$(TARGET_PATH): $(SOURCES) | show-summary
 | 
				
			||||||
	@RUSTFLAGS="$(RUSTFLAGS)" cargo build --target $(TRIPLE) --$(BUILD_TYPE)
 | 
						@cargo build --target $(TRIPLE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
show-header:
 | 
					show-header:
 | 
				
			||||||
	@printf "%s - version %s (commit %s)\n\n" "$(TARGET)" "$(VERSION)" "$(COMMIT_MSG)"
 | 
						@printf "%s - version %s (commit %s)\n\n" "$(TARGET)" "$(VERSION)" "$(COMMIT_MSG)"
 | 
				
			||||||
@@ -65,10 +64,10 @@ clean:
 | 
				
			|||||||
	@cargo clean
 | 
						@cargo clean
 | 
				
			||||||
 | 
					
 | 
				
			||||||
check:
 | 
					check:
 | 
				
			||||||
	@RUSTFLAGS="$(RUSTFLAGS)" cargo test --target $(TRIPLE) --$(BUILD_TYPE)
 | 
						@cargo test --target $(TRIPLE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
run:
 | 
					run:
 | 
				
			||||||
	@RUSTFLAGS="$(RUSTFLAGS)" cargo run --target $(TRIPLE) --$(BUILD_TYPE)
 | 
						@cargo run --target $(TRIPLE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
show-summary: show-header
 | 
					show-summary: show-header
 | 
				
			||||||
	@printf "project:\n"
 | 
						@printf "project:\n"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user